I am trying to install ImageMagick for MAMP 4.
My php version is: 7.1.19
I went to applications/MAMP/bin/php/php7.1.12/conf/php.ini
and changed this line ;extension=imagick.so
to extension=imagick.so
.
I also have a php folder in there of php7.2.1
so I did the above change there too. I restarted MAMP.
After doing that phpinfo told me that ImageMagick is present:
However when I try to run a line of code like this:
header('Content-type: image/jpeg');
$im = new Imagick("test.png");
I received the error localhost is unable to handle this request
, if I remove these lines of code then the page loads fine.
I have also installed ImageMagick, imagemagick 7.0.8-14 is already installed and up-to-date
.