简体   繁体   English

PHP致命错误:找不到类“ Imagick”-Windows 7 64位IIS PHP 5.2

[英]PHP Fatal error: Class 'Imagick' not found - Windows 7 64bit IIS PHP 5.2

I can't get PHP to recognize the ImageMagick (Imagick) class. 我无法让PHP识别ImageMagick(Imagick)类。 Everything else works, the command line tests (convert logo: logo.miff | imdisplay logo.miff) work, and I've followed every instructions I could find over it. 其他所有内容都可以正常运行,命令行测试(转换徽标:logo.miff | imdisplay logo.miff)可以正常工作,并且我已按照我在其中找到的所有说明进行操作。 Maybe I'm doing something wrong? 也许我做错了什么?

Instructions I've done: 我已经完成的指示:

  1. Download and install ImageMagick-6.7.6-1-Q16-windows-dll.exe 下载并安装ImageMagick-6.7.6-1-Q16-windows-dll.exe
  2. Download the PHP Imagick DLL: http://www.sk89q.com/2010/03/vc6-windows-binaries-for-imagick-2-3-0/ 下载PHP Imagick DLL: http : //www.sk89q.com/2010/03/vc6-windows-binaries-for-imagick-2-3-0/
  3. Used IIS to install the extension (automatically add the dll reference to PHP.ini) 使用IIS安装扩展(自动将DLL参考添加到PHP.ini)
  4. Saved, and restarted the "World Wide Web Publishing Service" and IIS 保存,然后重新启动“万维网发布服务”和IIS
  5. Checked phpinfo() to see if Imagick loaded, it had not. 检查phpinfo()以查看是否已加载Imagick,但尚未加载。
  6. I restarted Windows, and checked phpinfo again, no luck. 我重新启动Windows,并再次检查phpinfo,没有运气。

Did I miss anything? 我有想念吗? I've tried everything, looked for multiple DLLs, using each one, restarting both the service, IIS and Windows. 我已经尝试了所有方法,使用每个DLL寻找多个DLL,然后重新启动服务,IIS和Windows。 Still nothing has worked. 仍然没有任何效果。 Any help? 有什么帮助吗?

You are downloading the wrong version if you are using PHP with Apache from apache.org you need to use the VC6 versions and using PHP with IIS you should use the VC9 如果要从apache.org中将PHP与Apache一起使用,则下载的版本不正确,而您需要使用VC6版本,而将IIS与PHP一起使用时,则应该使用VC9

I can see you are downloading http://www.sk89q.com/2010/03/vc6-windows-binaries-for-imagick-2-3-0/ 我可以看到您正在下载http://www.sk89q.com/2010/03/vc6-windows-binaries-for-imagick-2-3-0/

I think you should download the VC9 version and see if it works 我认为您应该下载VC9版本,看看它是否有效

Thanks :) 谢谢 :)

I finally got it. 我终于明白了。 This is what I did. 这就是我所做的。

  1. Downloaded ImageMagick-6.6.4-0-Q16-windows-dll.exe from: http://image_magick.veidrodis.com/image_magick/binaries/ 从以下位置下载了ImageMagick-6.6.4-0-Q16-windows-dll.exe: http ://image_magick.veidrodis.com/image_magick/binaries/
  2. Downloaded the PHP dll from: http://valokuva.org/builds/ext/vc9/nts/imagick/2011-04-25_1849/ 从以下网址下载了PHP dll: http : //valokuva.org/builds/ext/vc9/nts/imagick/2011-04-25_1849/
  3. Switched IIS to PHP Build 5.3.8 将IIS切换到PHP Build 5.3.8
  4. Loaded the DLL by adding it to PHP.ini 通过将其添加到PHP.ini来加载DLL
  5. Restarted IIS 重新启动IIS
  6. Tested out the DLL by using a small script 通过使用小脚本测试DLL

Everything worked fine after that. 在那之后一切正常。 Turns out it was just my ImageMagick build. 原来那只是我的ImageMagick构建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM