mister5317 Posted March 18, 2009 Share Posted March 18, 2009 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! Quote Link to comment https://forums.phpfreaks.com/topic/150036-pdo_mysql-vs-phpinfo/ Share on other sites More sharing options...
WolfRage Posted March 18, 2009 Share Posted March 18, 2009 In your php.ini configuration file do you have the module turned on by getting ride of the ";". Quote Link to comment https://forums.phpfreaks.com/topic/150036-pdo_mysql-vs-phpinfo/#findComment-787958 Share on other sites More sharing options...
mister5317 Posted March 18, 2009 Author Share Posted March 18, 2009 Yes, it is uncommented. Quote Link to comment https://forums.phpfreaks.com/topic/150036-pdo_mysql-vs-phpinfo/#findComment-787960 Share on other sites More sharing options...
mister5317 Posted March 18, 2009 Author Share Posted March 18, 2009 If I comment out the extension line, rerun php -m, pdo_mysql is no longer there. Once I uncomment the line again, I see pdo_mysql in php -m, but not with phpinfo();. Quote Link to comment https://forums.phpfreaks.com/topic/150036-pdo_mysql-vs-phpinfo/#findComment-787964 Share on other sites More sharing options...
trq Posted March 18, 2009 Share Posted March 18, 2009 php's command line interface usually uses a completly different php.ini to that pf mod_php. Are you sure you don't need to edit another? Quote Link to comment https://forums.phpfreaks.com/topic/150036-pdo_mysql-vs-phpinfo/#findComment-787967 Share on other sites More sharing options...
mister5317 Posted March 18, 2009 Author Share Posted March 18, 2009 Hmmm, I am editing the php.ini file listed on the info page as the "Loaded Configuration File". Quote Link to comment https://forums.phpfreaks.com/topic/150036-pdo_mysql-vs-phpinfo/#findComment-788003 Share on other sites More sharing options...
mister5317 Posted March 18, 2009 Author Share Posted March 18, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/150036-pdo_mysql-vs-phpinfo/#findComment-788022 Share on other sites More sharing options...
trq Posted March 18, 2009 Share Posted March 18, 2009 Your going to need to check the apache logs for any php related startup errrors. Quote Link to comment https://forums.phpfreaks.com/topic/150036-pdo_mysql-vs-phpinfo/#findComment-788085 Share on other sites More sharing options...
mister5317 Posted March 19, 2009 Author Share Posted March 19, 2009 Any ideas of where/what logs I should be looking at? What am I looking for? Quote Link to comment https://forums.phpfreaks.com/topic/150036-pdo_mysql-vs-phpinfo/#findComment-788440 Share on other sites More sharing options...
trq Posted March 19, 2009 Share Posted March 19, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/150036-pdo_mysql-vs-phpinfo/#findComment-788469 Share on other sites More sharing options...
mister5317 Posted March 19, 2009 Author Share Posted March 19, 2009 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? Quote Link to comment https://forums.phpfreaks.com/topic/150036-pdo_mysql-vs-phpinfo/#findComment-788483 Share on other sites More sharing options...
trq Posted March 19, 2009 Share Posted March 19, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/150036-pdo_mysql-vs-phpinfo/#findComment-788534 Share on other sites More sharing options...
mister5317 Posted March 19, 2009 Author Share Posted March 19, 2009 I wish. There is macports. How would I go about reinstalling Apache, PHP and MySQL without junking up my system or breaking the default install? Quote Link to comment https://forums.phpfreaks.com/topic/150036-pdo_mysql-vs-phpinfo/#findComment-788545 Share on other sites More sharing options...
mister5317 Posted March 19, 2009 Author Share Posted March 19, 2009 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!? Quote Link to comment https://forums.phpfreaks.com/topic/150036-pdo_mysql-vs-phpinfo/#findComment-788552 Share on other sites More sharing options...
trq Posted March 19, 2009 Share Posted March 19, 2009 Im sorry man but Im not a mac user so wouldn't know where to start re-installing. There does seem to be something funny going on with your lmysqlclient though. Quote Link to comment https://forums.phpfreaks.com/topic/150036-pdo_mysql-vs-phpinfo/#findComment-788578 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.