Going to be a short blog post as Leopard has made this process very simple as PHP5 has been included as standard with the new OSX.
First thing you need to do is open terminal and edit your http.conf file by typing:
nano -sw /etc/apache2/httpd.conf
Firstly you need to enable the php module. Search for ‘php5_mod’ by typing it in when you press ctrl+w and press enter. This will bring you to a line with a hash before it….
#LoadModule php5_module libexec/apache2/libphp5.so
Remove this hash to enable php5.
Next you need to setup your document root, i.e. the location your webserver will default to when you go to http://localhost. Search for ‘DocumentRoot’ within nano again by pressing Ctrl+w and hitting return. Alter the location (I think its Library/WebServer or something by default) to be whatever you wish your webserver root to be. I set it to be the Sites folder of the User I setup for Leopard.
Next you need to enable Apache, this is exceedingly easy. Go to System Preferences and then Sharing. Click the checkbox next to Web Sharing and apache should be ready to do. Put a sample html or php file(including is always a good way to test if php is working) in the document root and go to http://localhost and you should see the sample page.
Next you need to get MySQL. I got it here: http://mirrors.sunsite.dk/mysql/downloads/mysql/5.0.html#macosx-dmg.
Follow the very easy steps in the package and you should be hunky-dorey!
