Virtual hosts, PHP and MySQL on Mac OS X 10.5 Leopard

A couple of weeks ago when I posted Mac OS X 10.5 Leopard improves accessibility I mentioned that I hadn't yet been able to get hold of a copy of Leopard to try the new features out for myself.

Well, later that week I decided to give it a try, so I went out and bought myself a copy along with a new hard drive so I could clone my current disk before installing Leopard. And that proved to be a very good thing.

Relying on my previous experiences of upgrading to a new major release of Mac OS X I decided to play it safe and use the Archive and Install option. I wanted a "clean" OS without having to create a new user and reinstall everything.

Archive and Install has worked fine for me before, but not this time. I'm not blaming Apple or anyone else for the trouble I had, but I think others may find themselves having similar problems, so describing my problems and what I did to work around them will hopefully be of help to someone.

First try: Archive and Install

As I write this I am running Leopard again, and this time everything seems to work properly. I say again, because after running into too many problems after my initial install I thanked myself for taking the time to make a bootable clone of my hard drive before installing.

Getting a working setup back was just a matter of visiting the Startup Disk panel in System Preferences and switching to the clone. A reboot and I was back to where I was before I started, except for one thing that I'll get to shortly.

The web development-related problems I had were these:

The above were serious enough that after spending many hours trying and failing to get my local web development stuff up and running again, I told myself to get over it and switch back to Tiger. So I did.

When I told my colleagues at work about this I was met with surprised looks and "Well I didn't have any problems. Everything works fine for me. I just inserted the Leopard disk and upgraded." It turned out that the difference was that they had all picked the default Upgrade option instead of choosing Archive and install. That's what I got for trying to be smart.

Not really wanting to leave that brand new copy of Leopard on my shelf to collect dust I decided to try it again, but just upgrading this time.

Preparing for the second try: cloning a disk used by Time Machine

To prepare for the upgrade I wanted to clone my Tiger disk again, and that gave me my next headache: Time Machine. Immediately after installing Leopard the first time I was foolish enough to switch on Time Machine and let it make a full backup of my Leopard disk. Making backups is good after all. But not if you later decide to make a clone of the disk that is used by Time Machine, even after you have rebooted into Tiger.

I deleted a visible folder called "Backups.backupdb" that Time Machine had created, and I thought that was where all the Time Machine data was stored. Apparently not. I tried cloning the disk with Carbon Copy Cloner and SuperDuper!, and both got stuck when they tried to copy a hidden folder called ".HFS+ Private Directory Data".

Reluctant to delete this folder without being sure that it was harmless I tried cloning everything else, but that also failed. What I did in the end was delete (in the Terminal) these files and folders:

I'm not sure that deleting the .fseventsd folder is necessary, but as far as I can tell it is a Leopard thing, and I wanted to get rid of all traces of Leopard from this disk, so delete it I did.

After that scary episode of deleting files I wasn't sure that I should be deleting I verified that everything seemed to still be working OK and breathed a sigh of relief. I was then able to clone the disk with Carbon Copy Cloner without any further problems (other than it taking an hour and a half).

I suppose wanting to clone a disk with Time Machine data on it is a somewhat unusual situation, so perhaps there won't be many others who run into the same problem. Just in case someone does, knowing that deleting these files and folders fixed the issue for me without causing any apparent problems might be helpful.

Disclaimer: In no way do I guarantee that doing this is safe. If you delete the files and folders mentioned here and end up losing valuable data, do not blame me. If there is data that you cannot afford to lose on the disk, make sure you have a reliable backup.

Second try: Upgrade and web server configuration

A quick couple of reboots to verify that the clone really worked and I was finally ready to install Leopard again, this time without doing an Archive and Install.

The upgrade went smoothly, and after about half an hour I had rebooted into Leopard with no noticeable problems. So far so good. Time to get my development sites up and running again. To do that I had to do a number of things.

Not too bad once you know what to do. It can take forever to find all the info though, so when it's time to upgrade my office machine I'll only need to revisit this article to find everything in one place.

After all of that, I finally have a Leopard install that I can use for Web development.


I got the info I needed to get my install of Mac OS X 10.5 Leopard working properly from various sources, including the following:

Posted on November 12, 2007 in Mac, PHP