Installing ImageMagick with MacPorts couldn’t be easier:
sudo port install ImageMagick
But getting it to work with your PHP installation is a bit harder. If you’ve installed PHP via MacPorts with the pear variant you can install the imagick extension via pecl:
sudo pecl install imagick
The trick to getting it to stop complaining about the Wand-config path, is by passing it the proper prefix for ImageMagick. When prompted, hit 1, then enter in:
/opt/local
Now just add this to the end of your php.ini file, and reboot apache:
[imagemagick]
extension=imagick.so
Pingback: Imagick Stub « SiteOrigin
Bless you. I almost gave up.
You’re welcome! I try to write this stuff down so that I can remember how to repeat the process.
And you made other people’s lives easier
Thank you!!!
who would have thought it was so simple
thank you!
You’re welcome!
THANK YOU!! I knew I was close and it had to be something simple, but had no idea where to even start. You’ve saved me hours of troubleshooting.
Yeah, this one was a bit tricky, which is why I blogged about it. I knew I wouldn’t remember for next time.
Cheers,
~e
Hi there. Ive been struggling to get Imagick installed for a few days now, im getting the error
sudo: pecl: command not found
How do i install PECL? Not found an easy to understand, clear solution for this, could you help? Im so close, have installed MacPorts and Xcode and ImageMagick, just need the php extension!!
Many thanks in advance!
If PHP was installed by MacPorts, and you selected the ‘pear’ variant, then you should already have it located here: /opt/local/bin/pecl (maybe its not in your $PATH?).
If you installed it another way, then you might need to get PEAR installed for your version of PHP and go from there, something you may or may not be able to do without a recompile.
Found this very helpful guide to install PEAR/PECL on MAMP..
http://www.lullabot.com/articles/installing-php-pear-and-pecl-extensions-on-mamp-mac-os-x-107-lion