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
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
Share on other sites

Im a Linux user so I'm not sure where the logs are within OSX, but there usually within /var/log/apache on linux. You'll want to look at the error_log.

 

You'll be looking for startup errors of some kind. You might even grep the file for 'pdo_mysql' if its to big to browse.

Link to comment
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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.