- Open Terminal.
- Open /etc/apache2/httpd.conf in your favourite command line editor using
sudo. I did the following:
sudo emacs /etc/apache2/httpd.conf
- After authenticating, the file will open. Scroll down to the line that says:
#LoadModule php5_module libexec/apache2/libphp5.so
- Remove the hash mark (#) to uncomment that line, then save and close the file. In
emacs, this is done by pressing Control-x Control-s (save) followed by Control-x Control-c (close).
- Restart the Apache web server.
- PHP should now be up and running!
Friday, November 5, 2010
These are instructions to quickly and easily enable PHP on Snow Leopard. I won't discuss any other configurations on this post beyond those necessary to get PHP running.