Enabling PHP
1. Goto System Preferences>Sharing.
2. Enable "Web Sharing".
3. Open Terminal.app. Enter "sudo apachectl restart".
4. Navigate to "localhost" in a web browser. You should see the welcome page.
5. To make sure PHP is working, create phpinfo.php in /Users/Sites. *** There is a way to create phpinfo.php in command line, but I forget how to do it. ***
6. Create php.ini. In terminal, type:
cd /etc sudo
cp php.ini.default php.ini sudo chmod 666 php.ini
Virtual Hosts