Page 1 of 1

Enabling php_pdo_mysql driver on Leopard

Posted: Mon Feb 02, 2009 10:26 am
by johnedwards
Hi!

I'm working on a Mac with Leopard OS.

I need to have the php_pdo_mysql driver enabled and unfortunately the only pdo-drivers enabled with php that comes packaged with Leopard are sqlite2 and sqlite.

How can I enable pdo_mysql? Do I need to compile php form source?

I did find this tutorial for compiling php from source, http://www.malisphoto.com/tips/php-on-os-x.html but there is nothing about enabling the pdo_mysql driver.

If I do have to compile from source -- and I think I understand there are advantages to doing so, will that create problems with my local testing environment which is stable?

Thank you!

Re: Enabling php_pdo_mysql driver on Leopard

Posted: Tue Feb 03, 2009 8:58 am
by johnedwards
Well, casting caution to the wind I jumped in with both feet and compiled php from source following the tutorial at http://www.malisphoto.com/tips/php-on-os-x.html

I don't think I realized what a slippery slope this could be and now I'm hip deep in trouble. Oh well, I'm sure I'll learn something here.

Anyway, when I point my browser at localhost, I can't connect. I checked my server error log [/private/var/log/system.log] and found the error:
Syntax error on line 115 of /private/etc/apache2/httpd.conf:Cannot load /usr/libexec/apache2/libphp5.so into server:
Google found a discussion about this error at entropy:http://www.entropy.ch/phpbb2/viewtopic.php?t=2869
The second post from 'MICKEY77' references an apparent solution at apple: http://discussions.apple.com/thread.jsp ... 7&tstart=0

At this post scrolling down to the first post from 'GENETIQ' we are told the whole matter can be solved by recompiling Apache and the steps to do that are given. The rabbit hole is getting deeper.

Could someone please give me some feedback on this? This is new territory for me and a more experienced perspective would be helpful.