Mountain Lion

Problem with GD, PHP and Mountain Lion solved

When installing PHP on a new blank installation of Mountain Lion I kept running into problems getting PHP working with GD. There was stuff missing in the installed that was not covered in the additional X11redirect package. But after a lot of late nights with Google I finally figured it out. The X11 server is no longer included in Mountain Lion and you need to install it separately. Once I figured this out I also found the Apple support item on this. As you see it’s all about using the right keywords when trying to find something, who thought that the X11 server has the required components for the GD parts of PHP.

So what I need to add to the instructions is that you need to download and install the XQuartz X11 server to be able to include GD with PHP. Just install the package and all will be fine again.

Startup script locations

I once thought that the location for the start up scripts should be in /System/Library/LaunchDaemons which I had read in other webpages I had found at the time. Never questioning what I had found as I didn’t know any better and it all worked.

Until last week a comment added to the Apache startup script page by Anonymouse started to get me thinking, where my assumptions correct. The upgrade to Mountain Lion and the disappearance of all my startup scripts from /System/Library/LaunchDaemons pushed me over. After doing some research I hound the following overview of where which scripts should be:

    ~/Library/LaunchAgents          Per-user agents provided by the user.
     /Library/LaunchAgents          Per-user agents provided by the administrator.
     /Library/LaunchDaemons         System wide daemons provided by the administrator.
     /System/Library/LaunchAgents   OS X Per-user agents.
     /System/Library/LaunchDaemons  OS X System wide daemons.

Therefore I’ve now decided to amend the documentation and put all my scripts in /Library/LaunchDaemons. I hope you all agree that this is a better place.

Mountain Lion progress

If you are dependent on any of the stuff that is documented here then please wait while I upgrade and test all the instructions for Mountain Lion. I will update this post regularly with my progress. Currently I’m upgrading my main desktop to see if this will affect the running setup. After that I will install a clean Mountain Lion machine for documenting the start from scratch.

First discovery after the upgrade is that all you config files in /etc are gone, so are our startup scripts in /System/Library/LaunchDeamons. This means that the config for Apache, php and MySQL are missing.

Got MySQL running by replacing the startup script. Apache ran again after restoring /etc/httpd from a backup but PHP needed recompiling.

Before upgrading make sure you make a copy of the file InstallESD.dmg from the Mountain Lion installer package. How to find it, read this. This because you need to get an optional installer package if you want to use GD. Mount the disk image and install the file from Packages called X11redirect.pkg

The MAMP stack is now done, tested and documented. Not many changes…

Mail part is now also documented!