Jump to content

pdo_mysql vs phpinfo


Recommended Posts

I am running Apache/PHP on Leopard with the base install provided by Apple.  I need support for pdo_mysql so I followed the directions at http://starfog.com/node/52.  When I run php -m from the command line, I see that both PDO and pdo_mysql are listed.  If I check my phpinfo page, I do not see pdo_mysql anywhere.  What can I do to get pdo_mysql support on Leopard?

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/150036-pdo_mysql-vs-phpinfo/
Share on other sites

I have confirmed that I am editing the correct php.ini file.  I also have the GD module installed.  Once I commented the extension line for that module I no longer saw GD support with php -m or phpinfo();.  After uncommenting it, I saw it in both locations again.

Link to comment
https://forums.phpfreaks.com/topic/150036-pdo_mysql-vs-phpinfo/#findComment-788022
Share on other sites

Thank you!  Can you help me debug what I have found?

 

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so' - (null) in Unknown on line 0

 

I also found this from a few days ago, but I haven't seen it in the logs recently.

dyld: Library not loaded: /usr/local/mysql/lib/libmysqlclient.16.dylib
  Referenced from: /usr/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so
  Reason: no suitable image found.  Did find:
/usr/local/mysql/lib/libmysqlclient.16.dylib: mach-o, but wrong architecture

 

Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/150036-pdo_mysql-vs-phpinfo/#findComment-788483
Share on other sites

Looking at that blog you refer to in your first post....

 

I did not want to compile my own PHP from scratch. It has some of the same problems as using downloaded packages and there are problems with compiling PHP 5 on Leopard for the x86_64 architecture.

 

On a whim, I download the old PECL extension for 5.0 and compiled it. I generated a pdo_mysql.so and put it in my extensions directory, enabled it and it worked. At least so far. Since it's an old version, I may yet see some odd or buggy behavior. Time will tell.

 

Id say you have incompatible versions. is there not simply some sort of package manager on Leopard? I know on Debian I would simply do...

 

apt-get install php5-mysql-pdo

 

or similar.

Link to comment
https://forums.phpfreaks.com/topic/150036-pdo_mysql-vs-phpinfo/#findComment-788534
Share on other sites

I also tried the instructions here: http://discussions.apple.com/message.jspa?messageID=8418099#8418099

I got to the configure command and had this problem:

 

checking for MySQL support for PDO... yes, shared
checking for mysql_config... /usr/local/mysql/bin/mysql_config
checking for mysql_query in -lmysqlclient... no
configure: error: mysql_query missing!?

Link to comment
https://forums.phpfreaks.com/topic/150036-pdo_mysql-vs-phpinfo/#findComment-788552
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.