Snow Leopard Install Hazardous to Apache Virtual Hosts, MySQL, and PHP

Friday, August 28th 5:57pm Matt

I am using the Apache vhosts feature to run multiple websites on my machine, many of which are running WordPress and therefore also using MySQL. The Snow Leopard installation was almost as disastrous as it could be for this setup.

Pre Snow Leopard Installation Warning

Be sure to back up your

/etc/apache2/extra/httpd-vhosts.conf

file before you install Snow Leopard. It is going to replace that file without backing up the one you had before. That is not a file that’s included in Time Machine backups.

Post Snow Leopard Tasks

  1. First you need to copy the vhosts file you saved back where it belongs. Otherwise you need to recreate your entries. Luckily I had two computers with this setup so I had the one on the other computer to look at for reference.

  2. Next, MySQL probably won’t be working. In my case the was because the Snow Leopard install deleted the

    /usr/local/mysql

    symbolic link to my current version of MySQL. You just need to replace this using the following terminal commands:

    cd /usr/local
    sudo ln -s mysql-5.1.30-osx10.5-x86 mysql

    Your current version of MySQL will of course probably be different than that, but you get the idea.

  3. There is a bizarre issue where Snow Leopard deletes the php.ini or reacts differently if it isn’t there. The symptom is that when viewing websites on your local server PHP will complain about not having a time zone set. This web page has the solution for that, and it’s not difficult, but long enough that I don’t want to repeat it here.

For me, these three steps got me working again. Hopefully they will work for you or will at least get you started. Good luck.

1

Ben

Thursday, November 12th 12:56am

If only I saw this before. Darn vhosts all gone :( sniff.
It seems to handle changed files and makes a folder called originals with the new files in that and leaves ur changed files alone. However the vhosts seem to be overwritten regardless.

Sniff

2

Matt

Thursday, November 12th 11:28am

I know, that’s the problem, there’s not really any good way of warning people about it. I hope at least Apple fixes it later releases so when they print newer DVDs those people will be spared the pain.

Submit a Comment