It's not too difficult to do. First thing you need to know is turn on Personal Web Sharing in System Prefs -> Sharing.
Where to put the files? Library/Webserver/Documents
How to enable PHP? This is the tricky one.. Open terminal and type the following commands (ignore stuff in parenthesis):
cd /etc/httpd
sudo cp httpd.conf httpd.conf.bak (creates a backup of httpd.conf if you hose the original)
sudo vi httpd.conf (opens the vi text editor and opens the file you need to edit)
---scroll down until you see this section:
Code:
# Note: The order in which modules are loaded is important. Don't change
# the order below without expert advice.
#
# Example:
# LoadModule foo_module libexec/mod_foo.so
#LoadModule vhost_alias_module libexec/httpd/mod_vhost_alias.so
#LoadModule env_module libexec/httpd/mod_env.so
LoadModule config_log_module libexec/httpd/mod_log_config.so
etc.....
type i (this will switch to insert mode)
---remove the # in front of this line:
Code:
LoadModule php4_module libexec/httpd/libphp4.so
---Do the same for this line in the next section:
type ESC
type :wq! (hit enter this will force a Write then quit)
---Restart apache:
sudo apachectl graceful
---That should do it. It might look a bit daunting, but it will do what you asked. There may be a simpler way, but I don't know of one. Good luck.