Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 4 - ImageMagick module not available with this PHP installation

trying to get ImageMagick working on my local machine but receive the error:

ImageMagick module not available with this PHP installation.

I have never seen that error so not sure where to go from here. I am running PHP 5.6.2 (according to MAMP) and have since I first saw the error installed ImageMagick with homebrew and then also tried the mac installer but I still get the same issue.

Any help?

like image 512
Lovelock Avatar asked Nov 17 '14 19:11

Lovelock


2 Answers

Same problem, using homestead, apt and nginx:

  1. Log into homestead

  2. sudo apt-get update && sudo apt-get install -y imagemagick php5-imagick && sudo service php5-fpm restart

    • sudo apt-get update - make sure everything is up to date.
    • sudo apt-get install -y imagemagick php5-imagick - make sure the modules are installed. Since the question is about PHP5 this is also using php5-imagick, I guess there is a newer version available. They -y part is just about automatically answering Yes to any questions from the install.
    • sudo service php5-fpm restart - after installing a new php module it's needed to reload the service using that. In this case, since the question is about MAMP, I assume they're trying to run something with a webserver, therefore it's about the php-fpm service.
like image 174
Lpgfmk Avatar answered Nov 01 '22 06:11

Lpgfmk


I realise it's been a while since you asked the question, however I ran into this issue also. In my case (using HomeBrew) I simply installed ImageMagick AND the PHP module using:

brew install imagemagick
brew install php55-imagick
apachectl restart

It's important to restart APACHE after installing these.

As far as your question is concerned (MAMP), There are many instructions online on how to install ImageMagick with MAMP, see: How to install Image Magick for MAMP (Pro) on Mountain Lion (10.8.2)

As one of the comments suggests, ImageMagick comes with MAMP, you just have to enable it.

Hope this helps someone :)

like image 29
Pete Avatar answered Nov 01 '22 04:11

Pete