Snow Leopard, Apache and PHP

Mac OS X Snow Leopard comes with Apache web server preinstalled. It can be engaged by enabling “Web Sharing” under “Sharing” preferences.

To get PHP going on Snow Leopard’s Apache web server one would need to download the latest version of Xcode and install it. This will install PHP onto the system.

Now to tie the two together, visit the /etc/apache2/httpd.conf file and uncomment the line “LoadModule php5_module        libexec/apache2/libphp5.so”.

Restart the web server by disabling and then enabling the Web Sharing.