---
title: "windows下PHP安装imagick扩展"
author: "muyu"
date: "2011-07-29T21:26:57Z"
tags: ["imagemagick", "imagick"]
categories: ["编程语言"]
slug: "windows-php-imagick"
draft: false
lastmod: "2011-07-29T21:29:47Z"
id: 1136086
url: "https://muyu.iteye.com/blog/1136086"
---

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

1. 一个是win7下，下载完php\_imagick.dll，拷贝到ext目录下时，注意右键点击属性，安全下的“解除锁定”要点击一下。
2. 另一个是版本问题，按照[http://valokuva.org/?page\_id=50&cpage=8#comment-22560](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](http://image_magick.veidrodis.com/image_magick/binaries/ImageMagick-6.6.2-10-Q16-windows-dll.exe) ”。

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

其他资料还是在《[Imagick Windows Builds](http://valokuva.org/?page_id=50&cpage=8#comment-22560) 》里找，注意zts与nts的区别，“The latter is usually used with FastCGI”。