views:

569

answers:

1

So I read this article on how to install Imagemagick with MAMP, and did exactly how it said, (sudo port install Imagemagick, everything installed okay, then change the envvars file), yet I still get this error when trying to run a script that uses it:

Fatal error: Class 'Imagick' not found in /Applications/MAMP/htroots/active/includes/images.php on line 19

Does anyone have any idea why this is working for seemingly everyone except me?

+1  A: 

HI,

This looks like the Imagick extension is not loaded by PHP.

If you create a php script that only contains this :

<?php
phpinfo();
?>

Do you get anything (like an "imagick" section) mentionning Image magick in the output ?

If not (that's probably the case, considering the error you're gettin), Image Magick extension probably isn't loaded.


Two ideas, now

  • Check you php.ini file : it should contain a line like "extension=imagick.ext" (don't know what "ext" is on a mac, sorry)
  • did you restart apache to have te new extension take into account ?
  • do you have any error in the PHP/Apache error log ? Like something that said imagick has not been loaded and/or why ?
Pascal MARTIN
Yeah that was sort of it, I ended up reading [this](http://www.daniweb.com/forums/thread194181.html) thread, which fixed the issue for me.
Vestonian
OK ; good to know :-)
Pascal MARTIN
Oh wow, there's no markdown in the comments.
Vestonian
No ^^ it's kept as simple as possible ; something like not wanting real "conversations" like on a forum, but just quick questions and answer, if I remember correctly.
Pascal MARTIN