1、打开:http://pecl.php.net/package/imagick/3.4.3/windows ,下载:7.0 Thread Safe (TS) x64,如图1
2、解压缩后,复制 php_imagick.dll 至 C:/php-7.0.22/ext,如图2
3、运行:php-cgi.exe -b 127.0.0.1:9000-c C:/php-7.0.22/php.ini,报错:PHP Warning: PHP Startup: Unable to load dynamic library ‘C:/php-7.0.22/ext/php_imagick.dll’,如图3
4、打开:https://www.imagemagick.org/script/download.php#windows ,下载:ImageMagick-7.0.6-10-Q16-x64-dll.exe,如图4
5、安装:ImageMagick-7.0.6-10-Q16-x64-dll.exe,全选,如图5
6、运行:convert –version,正常,如图6
7、卸载:ImageMagick-7.0.6,如图7
8、仍然报错,打开:http://windows.php.net/downloads/pecl/deps/ ,下载:ImageMagick-6.9.3-7-vc14-x64.zip,如图8
9、新建目录:C:/ImageMagick-6.9.3-7-vc14-x64,如图9
10、复制目录:D:/Soft/ImageMagick-6.9.3-7-vc14-x64/bin 下的所有文件,如图10
11、复制至目录:C:/ImageMagick-6.9.3-7-vc14-x64,如图11
12、新建环境变量:C:/ImageMagick-6.9.3-7-vc14-x64,如图12
13、新建系统变量:MAGICK_HOME,其值为:C:/ImageMagick-6.9.3-7-vc14-x64,如图13
14、重启机器,运行:php-cgi.exe -b 127.0.0.1:9000-c C:/php-7.0.22/php.ini,正常,如图14
15、运行:convert –version,正常,版本更新为:ImageMagick 6.9.3-7 Q16 x64,如图15
16、查看phpinfo(),正常,如图16
注:附件下载
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/251085.html