-
Notifications
You must be signed in to change notification settings - Fork 0
Imagick for MAMP Pro installation guide
This a forked and slightly more detailed Version from 0xPr0xy’s original guide at https://github.com/0xPr0xy
- You’ll need to use the command line (all terminal commands are prepended with the
$
sign). - You’ll need to have Homebrew installed
- This guide is tested with OSX 10.6 (other versions may vary)
- This guide is tested with MAMP Pro 2.1.1 (other versions may vary)
Using Homebrew, you’ll install a PHP53 compat version of Imagick.. first let Homebrew search the formula:
$ brew search php53-imagick
The above search should return something like josegonzalez/php/php53-imagick
.. use this for the next step:
$ brew install josegonzalez/php/php53-imagick
If you get errors alike:
Error: No available formula for XYZ
Please tap it and then try again: brew tap XYZ
Do as you’ve been told, and run the brew tap ...
command exactly as the error told you.
After that, repeat the step which caused that error.
In MAMP Pro go to the menubar, and choose File > Edit Templates > PHP > PHP x.x.x php.ini
A simple editor window will popup where you can edit the ini file.
A search for the term extension=
, will lead you to a block with various lines of
extension=...
. Now simply ad the following one and save the file:
extension="/usr/local/Cellar/php53-imagick/3.1.0RC2/imagick.so"
$ cp /usr/local/Cellar/freetype/2.4.10/lib/libfreetype.6.dylib /Applications/MAMP/Library/lib/
Open the file /Applications/MAMP/Library/bin/envvars
in your editor, and comment out the following lines:
DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib:$DYLD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH
A search for the term `imagick` should bring you to a section reading like so:
imagick module enabled
imagick module version 3.1.0RC2
imagick classes Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator
ImageMagick version ImageMagick 6.7.7-6 2012-09-18 Q16 http://www.imagemagick.org
ImageMagick copyright Copyright (C) 1999-2012 ImageMagick Studio LLC
ImageMagick release date 2012-09-18
ImageMagick number of supported formats: 191
If you get an error while installing libxml2, verify that you have installed the latest version of Xcode command line tools (Xcode/Preferences/Downloads/Components)