Fatal error: Class 'Imagick' not found
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").
Terry
I need to answer more questions :$ Studying Graphic Design @ OCADU.
Updated on July 09, 2022Comments
-
Terry almost 2 years
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...
- Install/reinstall different versions of ImageMagick
- Try various VC9 builds of php_imagick.dll to 'wamp\bin\php\php5.3.8\ext\'
- Have updated my php.ini to include 'extension=php_imagick.dll'
- Have restarted my pc and WAMP... I can't count how many times O_o
I also get this error on WAMP startup
The funny thing is that php_imagick.dll shows up in my PHP extensions via the WAMP taskbar
but not in my localhost PHP-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.