Edit your /etc/apache2/httpd.conf
and make sure the line:
LoadModule php5_module libexec/apache2/libphp5.so
…exists. It’s commented out by default in the standard OS X config, but you just need to uncomment it, then re-start Apache:
sudo apachectl restart
And you should be good to go.