Leopard Breaks Apache & MySQL
It seems that with Leopard Apple has decided to go forward with Apache2 henceforth. This is great but if you’re like me and do all your development on your local machine using Apache & PHP and all that jazz there’s a good chance that installing Leopard hosed your local webserver and PHP install to some degree.
The errors I was getting were:
[error] [client 10.0.1.198] client denied by server configuration: /Users/chris/Sites/index.html
AKA: the dreaded 403.
Solution: In the Terminal do the following:
sudo cp /etc/httpd/users/chris.conf /etc/apache2/users/
Replacing the name of your user for “chris”. Restart Apache2:
sudo apachectl restart
You should at least now be able to see your files, even if the PHP ones are showing up as text.
To get PHP working again, once more in the Terminal:
sudo nano /etc/apache2/httpd.conf
Find the line
#LoadModule php5_module libexec/apache2/libphp5.so
and uncomment it (ie: delete the # from the front). Save that file. Restart Apache2 per above.
Basic PHP should now be working, but in my case phpMyAdmin wasn’t because once again the location of mysql.sock has changed.
To get that working again, follow the instructions I posted over a year ago in “phpMyAdmin, ‘Error #2002 – The server is not responding’, and OS X 10.4.4″.