Install ImageMagick Extension on Windows with PHP 7.2

This content is from https://github.com/mkoppanen/imagick/issues/224#issuecomment-367532736

For those of you like me who have never installed ImageMagick on Windows with PHP, let alone for PHP 7.2, I found this article very useful:
Install the ImageMagick PHP extension in Windows

The table here only goes up to PHP 7.1, so I also confirm that using these builds worked for me on PHP 7.2.2/Windows 10 (thread-safe version):

  • ImageMagick-7.0.7-11-vc15-x64.zip
  • php_imagick-3.4.3-7.2-ts-vc15-x64.zip

The workflow seems really clunky to me, but I did exactly as instructed:

  • Extract from php_imagick-….zip to the ext directory the php_imagick.dll file of your PHP installation
  • Extract from ImageMagick-….zip to the root PHP directory (where php.exe resides) the DLL files that start with (and there are a TON):
    CORE_RL_
    IM_MOD_RL_
  • Add this line to your php.ini file
    extension=imagick

And then to run a simple test (should output a 1):
php -r "print(class_exists('imagick'));"

If anyone knows a more elegant installation solution, please let me know 

紹介

クリスチャンです。

コメントを残す

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください