How do I enable PHP on Mountain Lion OS X 10.8? Just upgraded to Mountain Lion, and wanted to make PHP work on the built-in version of Apache.
Edit /private/etc/apache2/httpd.conf
Find the line that says LoadModule php5_module libexec/apache2/libphp5.so and uncomment it by editing out the # at the beginning of the line. (Then save the file, obviously.)
Go to Terminal and type sudo apachectl graceful at the console: