日期:2014-05-17  浏览次数:20392 次

windows下PHP安装imagick扩展

别的不多说,网上有很多文章。只是运行不成功的也有很多,备注两点:

  1. 一个是win7下,下载完php_imagick.dll,拷贝到ext目录下时,注意右键点击属性,安全下的“解除锁定”要点击一下。
  2. 另一个是版本问题,按照http://valokuva.org/?page_id=50&cpage=8#comment-22560 说的,“Apache, PHP and Imagemagick all have to be built with the same Visual Studio version on Windows”,因此我们必须去找一个用VC9编译的imagemagick,就是“ImageMagick-6.6.2-10-Q16-windows-dll.exe ”。

我经历了PHP无法启动、PHP启动了但phpinfo显示imagick的support文件数为0、phpinfo关于imagick正常了却无法new imagick,直到我更换了imagick老版本。

其他资料还是在《Imagick Windows Builds 》里找,注意zts与nts的区别,“The latter is usually used with FastCGI”。