Opened 15 years ago
Closed 15 years ago
#22209 closed defect (invalid)
php5-mysql won't connect to mysql
Reported by: | tq@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.8.1 |
Keywords: | Cc: | ||
Port: | php5-mysql |
Description
I upgraded to Snow Leopard and thought it a good time to refresh my development environment. As suggested, I reinstalled a fresh macPort, cleaned and uninstalled. Then I installed the things I need.
I know that I want mysql5-server. I know that I want php5-mysql. I also want mcrypt, tidy and mbstring (phpmyadmin likes it). So, I installed them. It all works great except that php does not operate mysql properly. In a practical sense, that means I get an error, "Call to undefined function mysql_connect()".
I tried all sorts of thing. Uninstalling and reinstalling. Twice I got it to work. Once, with no clue of how. The other time by installing php5-mysql first. However, I have not been able to get it to work again and I have tried a million variations.
When it worked, I observed that the configuration string included, "--with mysql" (or something close). It also had sections in phpinfo() for mysql and mysqli as well as mysqlnd. These are missing in all the ones that don't work.
Preparing for this inquiry, I did a complete clean, uninstall, reboot, and install php5-mysql cycle. It still gives me the error message. In case it helps, I have attached a transcript of my shell session and a pdf of my phpinfo() report.
I really need this to work. Help will be deeply appreciated.
tqii
Attachments (2)
Change History (5)
Changed 15 years ago by tq@…
Attachment: | php5-mysql_installTranscript.text added |
---|
comment:2 Changed 15 years ago by jmroot (Joshua Root)
Cc: | tq@… removed |
---|---|
Owner: | changed from macports-tickets@… to ryandesign@… |
Port: | php5-mysql added |
comment:3 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → invalid |
---|---|
Status: | new → closed |
Please reread lines 363 thru 367 of your transcript, which contain the solution to your problem:
Your php.ini contains a line that will prevent php5-mysql and other PHP extensions from working. To fix this, edit /opt/local/etc/php5/php.ini and delete this line: extension_dir = "./"
shell transcript