Mavericks OSX 10.9 Update php fix

I updated to OSX 10.9 Mavericks this week, and as with all updates, it broke PHP. I run a local MAMP server for development purposes and it all works OK except that you have to re-enable PHP in the apache configuration file. I found a useful guide over at coolestguidesontheplanet.com which included these steps:

Open a terminal window and edit the httpd.conf file:

sudo nano /etc/apache2/httpd.conf

Uncomment this line:

LoadModule php5_module libexec/apache2/libphp5.so

Write out and save the file, then restart apache:

sudo apachectl restart

… and Robert’s your Mother’s Brother.