Steve Gattuso
Steve Gattuso

Reputation: 7812

Imagemagick not installing with MAMP

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?

Upvotes: 0

Views: 3914

Answers (1)

Pascal MARTIN
Pascal MARTIN

Reputation: 400912

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 ?

Upvotes: 4

Related Questions