Finding the config file
This one took me a while but I figured out the apache config now lives in /etc/apache2/httpd.conf. To enable PHP 5 you need to crack open that file as root to edit it. Using vi:
sudo vi /etc/apache2/httpd.conf
Or using Textmate
sudo mate /etc/apache2/httpd.conf
Enabling PHP
Find the line which loads the PHP 5 module, which looks like this:
#LoadModule php5_module libexec/apache2/libphp5.so
The line is currently commented out. All we have to do is remove the comment symbol, #
, so the line looks like this:
LoadModule php5_module libexec/apache2/libphp5.so
Save.
Now stop and start apache2 using either the Sharing control panel or by typing:
sudo apachectl restart
from the command prompt.
If you enjoyed this post, make sure you subscribe to my RSS feed!
