dongshuo8756 2012-10-24 10:06
浏览 158
已采纳

致命错误:未找到“Imagick”类

PHP 5.3.8

WAMP 2.2.21

ImageMagick 6.6.2 Q16


Fatal error: Class 'Imagick' not found happens no matter what. No matter how many times I...

  1. Install/reinstall different versions of ImageMagick
  2. Try various VC9 builds of php_imagick.dll to 'wamp\bin\php\php5.3.8\ext\'
  3. Have updated my php.ini to include 'extension=php_imagick.dll'
  4. Have restarted my pc and WAMP... I can't count how many times O_o

I also get this error on WAMP startup

enter image description here


The funny thing is that php_imagick.dll shows up in my PHP extensions via the WAMP taskbar

enter image description here

but not in my localhost PHP-Loaded Extensions:

localhost Loaded Extensions


Does anyone have any ideas to why this is happening? Or any suggestions?


SOLUTION: I had to learn the hard way... WAMP 2.2 x32 NOT x64, ImageMagick 6.6.4 Q16 at the greatest.

  • 写回答

1条回答 默认 最新

  • dt3674 2012-10-24 10:33
    关注

    You are not loading the php_imagick.dll extension.

    Check first of all that the file is there and is readable. If it is, then it is not loading because the DLL itself requires some other DLL; this error isn't usually shown by Windows. You will need some tool such as DEPENDS to load php_imagick.dll and see what unresolved externals it contains.

    You will probably find that some functions are imported by a library (such as libeay32.dll) that is maybe associated with an extension you did not load, or is in the PHP directory but ought to have been copied into Windows' SYSTEM directory, or maybe uses a different VC runtime (e.g MSVCR90.DLL).

    For example, a sample PHP 5.3 php_imagick.dll I found turns out to depend on these two DLL's

    CORE_RL_WAND_.DLL
    CORE_RL_MAGICK_.DLL
    

    and guess what, CORE_RL_MAGICK is itself depending on other symbols, which explains the problems this guy was experiencing (his solution was maybe a bit more thorough than necessary, but hey, whatever works -- and it might work for you too, but read on)

    ImageMagick - "CORE_RL_magick_.dll not found" or how to install RMagick on windows with ruby 1.9.2

    Looking into CORE_RL_MAGICK again with DEPENDS turns out a dependence on a specific version of Visual C++ Runtime (and QT too, for some versions of IM), which ties this in the ugly can of worms known as "VC6 against VC9" (e.g. http://www.websiteadministrator.com.au/articles/install_guides/installing_php533_pg2.html ).

    Now, what should you do? It depends. Literally; for instead of blindly reinstalling at random until the stars are right (again: it might work. It often does!), I would fire up DEPENDS on the imagick DLL, then on ImageMagick core DLL, and so on, until I hunted down the maze of twisty little dependencies, all alike, that Windows ought to tell you about, but doesn't.

    (That's why it's called "DLL Hell").

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来