Enabling php_pdo_mysql driver on Leopard

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
johnedwards
Forum Newbie
Posts: 5
Joined: Mon Jan 19, 2009 7:59 am
Location: Southern Vermont

Enabling php_pdo_mysql driver on Leopard

Post 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!
Last edited by johnedwards on Tue Feb 03, 2009 9:01 am, edited 2 times in total.
johnedwards
Forum Newbie
Posts: 5
Joined: Mon Jan 19, 2009 7:59 am
Location: Southern Vermont

Re: Enabling php_pdo_mysql driver on Leopard

Post 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.
Post Reply