Search code examples
phpwampimagickphp-extension

Issue Running Imagick module (PHP 5.4.13, WAMP server)


I have been trying to solve the issue with my production server for the past few hours now. The issue I am encountering relates to the PHP module Imagick (Image Magick).

I am running a WAMP server on Windows 7 x64 SP1. (Just a production server). The PHP configuration is Thread Safety enabled and an x86 architecture.

I have installed Image Magick 6.8.9-0 Q16 x86. Consequently I moved the DLL downloaded from PECL and installed it in my extension directory. The DLL downloaded is PHP 5.4 Thread Safe (TS) x86.

The error I am getting while starting apache is as follows:

PHP Warning:  PHP Startup: Unable to load dynamic library
    'Z:/wamp/bin/php/php5.4.16/ext/php_imagick.dll' - The specified procedure
    could not be found.\r\n in Unknown on line 0

My PHP.ini file also includes the following line: extension=php_imagick.dll

Any ideas? I have tried uninstalling, re-installing, checking Path variables and much more.


Solution

  • After a few days of frustration and many, many cases of trial and error I have finally come upon a solution. All versions of ImageMagick later than 6.6.4.0 under windows are compiled with vc10 instead of vc9. Source: ByteHash

    I uninstalled ImageMagick 6.8.9-0 Q16 x86, and re-installed version 6.6.4-0. Doing this immediately gave me a working Imagick extension and successfully launching apache with zero errors.

    You can find the full steps at the link above. Trust me, this seems to be the only solution as I have attempted everything else I could find on Stack Overflow and Server Fault.