Hello,
I'm having some trouble getting ImageMagick to work on the latest version of WampServer. I managed to get it "working" to a point were it is loaded and can be seen in phpinfo() however I keep getting this error:
Fatal error: Uncaught exception 'ImagickException' with message 'UnableToLoadModule `C:\imagemagick\modules\coders\IM_MOD_RL_JPEG_.dll' in */test.php on line 6
When I try running this code:
$im = new Imagick();
$im->readImage('test.jpg');
$im->thumbnailImage(150, null);
$im->writeImage('thumb.jpg');
$im->destroy();
My current environment:
OS: Windows 7
WampServer: 2.5
Apache: 2.4.9
PHP: 5.5.12
I think it's a compatibility issue but I'm a bit lost at what I should do to fix it.
I'll try to recreated everything I did and some ideas why it's not working, perhaps I'm missing something.
1) Installed the latest WampServer (version 2.5 / 64bit)
2) Install the latest ImageMagick binary (ImageMagick-6.8.9-5-Q16-x64-dll.exe) again 64bit version into c:\imagemagick
3) Set an environment variable MAGICK_HOME inside of Windows 7 with a value of C:\imagemagick\modules\coders
4) I then downloaded the thread safe 64 bit version (5.5 Thread Safe (TS) x64) of the PECL ImageMagick dll's at: [
pecl.php.net]
5) Placed php_imagick.dll dll into the C:\wamp\bin\php\php5.5.12\ext and all the `CORE_RL_*.dll files into the C:\wamp\bin\apache\apache2.4.9\bin.
6) Located the active php.ini file and added the extension=php_imagick.dll
When I load phpinfo() I get that imagick is enabled and running this in php also confirms that it working:
if(extension_loaded('imagick')) {
echo 'Imagick Loaded';
} else {
echo 'failed';
}
However! I think this might be the issue, my imagick module version is 3.1.2 and the ImageMagick version is ImageMagick 6.8.8-4 Q16 x64.
This does not match up with the ImageMagick binary I downloaded: ImageMagick-6.8.9-5-Q16-x64-dll.exe.
The exe is 6.8.9-5 and the version of the dlls is 6.8.8-4 so I'm assuming it is a compatibility issue, however, what am I to do, older binaries are not provided and I don't want to download 3rd party.
Also most tutorials redirect to [
valokuva.org] for files which does not help as the site has been wiped and all that is present is the nginx homepage.
Also the IM_MOD_RL_JPEG_.dll that php is claiming does not exists does exist in C:\imagemagick\modules\coders.
I'm also thinking it might be an issues with Visual Studio version as the new WampServer is using VC11 and I think ImageMagick might be using VC10 but I'm not 100% sure + I'm don't really understand VC very well.
Any ideas? Been scratching my head with this for a few days looking for an answer.
-Julian