Step 1. Menu Bar > Go > Go to Folder... > /private/etc/apache2
Step 2. Open httpd.conf with TextEditor
Step 3. Uncomment this line:
#LoadModule php5_module libexec/apache2/libphp5.so
Step 4. Save this file onto the desktop as "httpd.conf"
Step 5. Drag the "httpd.conf" file you just created into /private/etc/apache2
Step 6. Authenticate your privileges: enter your password
Step 7. Make a copy of /etc/php.ini.default onto your desktop
Step 8. Rename php.ini.default to php.ini (the copy on your desktop)
Step 9. Drag the "php.ini.default" file you just created into /private/etc
Step 10. Authenticate your privileges: enter your password
Step 11. Open System Preferences > Sharing > Web Sharing: ON (check this option)
To Test:
Step 12. Create info.php with the content:
Step 13. Save it to /Library/WebServer/Documents
Step 14. Goto http://localhost/info.php
To Publish using your HOME/Sites directory
Step 15. Create info.php with content:
Step 16. Save it to /Users/$MYNAME/Sites
Step 17. Goto http://$COMPUTERNAME.home/~$MYNAME/info.php