Posted by Vince Wadhwani on Jan 29, 2008

If you upgraded from Tiger to Apple's OS X 10.5 Leopard you may find a few things that were OS related stopped working. In my case, PHP5 no longer responded as expected. Sure enough, some digging found it was disabled. Fortunately, it's pretty simple to get running again in Leopard.

Open up a terminal and type:

sudo vi /etc/apache2/httpd.conf +114

After typing in your password you'll find yourself on the exact line related to PHP5 that you need to uncomment. Remove the # at the start of the line so it looks like this:

LoadModule php5_module        libexec/apache2/libphp5.so

Then head over to your System preferences and stop/start your web server in the Sharing pane by unchecking and re-checking the box that says Web Sharing. That'll restart Apache2 for you -- this time with PHP5 enabled.