Getting MAMP 1.9 to work with Image Magick, imagick.so and other flora
It was a full eight hours of hair pulling. For some reason, all the tutorials that can be found on getting MAMP to work with Image Magick in Snow Leopard are incomplete, miss out information, or dated. Or all of them. They are excellent posts, but I could not get imagick.so to be loaded as a PHP module by following any of them. I won’t go into explaining what MAMP or Image Magick are, if you are reading this, you already know, and most likely are having the same problems I was having.
Here is a short list of the resources I used to write this procedure:
Getting Imagemagick (and more) to work with MAMP on OS X – misses info on compiling for Snow Leopard.
Installing Image Magick and Imagick for PHP for MAMP – misses change needed in ports conf file to enable Universal mode.
MAMP & Imagick on Snow Leopard – goes through the pitfalls, which makes the tutorial confusing, but goes into the Universal mode switch.
There are others which I may miss, such as forum posts or other blogs, if so, my apologies. In all, none of them go into the use of older libraries by MAMP in its sandboxed model, which breaks imagick.so when trying to compile it from source rather than using pecl.
1. Install MacPorts
I won’t go into details as you most likely have already done it if you’re reading this. Don’t update your ports yet!
2. Make MacPorts build Universal binaries
Simply edit /opt/local/etc/macports/variants.conf and add +universal at the end of the file. Now, update your ports collection by running:
sudo port -v selfupdate
3. Install Image Magick using MacPorts
Simple:
sudo port install ImageMagick
This takes a while, so go grab a coffee.



