Search code examples
mampimagick

How to enable Imagick in MAMP 4 (Lite)?


I am trying to enable Image Magick in MAMP 4 (Lite, not Pro) for PHP 7.1.0.
Everything I have found regarding this, is for MAMP 3.

It states, that I have to uncomment the line:
;extension=imagick.so

The guide said, I have to uncomment it this file:
/Applications/MAMP/conf/php7.1.0/php.ini

My phpinfo() says the loaded configuration file is:
/Applications/MAMP/bin/php/php7.1.0/conf/php.ini

I uncommented both and restarted the server, but the extension does not get loaded.

Any ideas on how to do that?


Solution

  • I seem to have found the issue.

    The extension_dir inside the php.ini does point to the non existing folder:
    /Applications/MAMP/bin/php/php7.1.0/lib/php/extensions/no-debug-non-zts-20151012/

    The only folder that exists is:
    /Applications/MAMP/bin/php/php7.1.0/lib/php/extensions/no-debug-non-zts-20160303/

    I don’t know why this is pointing to an older folder, but after changing it to the new one, Imagick gets loaded.