Leopard Breaks Apache & MySQL

   By chris on October 29th 2007 in /dev/random | 1,969 views

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″.

3 Responses to “Leopard Breaks Apache & MySQL”

  1. Joannou Ng responded on 05 Nov 2007 at 9:29 pm #

    This will be helpful to some folks:
    Migrating MySQL 5.0.45 to Mac OS X 10 .5 Leopard http://blog.tomatocheese.com/archives/2007/11/1/migrating_mysql_to_mac_os_x_leopard/

  2. Daniel responded on 22 Jan 2008 at 9:11 pm #

    Very helpful page, thanks for making it available!

  3. Stefan Kroon responded on 18 Feb 2008 at 11:29 am #

    Thank you very much for this quick guide! Very usefu!