I have a nifty virtual app server in-house that I like to write off and have one VM of XP running on, so for development I put out a quick Xampp 1.7.3 deploy. Alas I was shocked and horrified, well surprised, to find that Imagick was not pre-compiled (ya, xampp is compiled in case you didn’t know). No biggie I hoped over to the nice folks at http://www.imagemagick.org/script/index.php and grabbed the latest binary for ImageMagick-6.6.4-9-Q16-windows-dll.exe Installed and restarted Apache, service crashed out. Some quick reads and I discovered php compiled in VC 6 and 9 mismatches had been creating quite a few headaches for the good folks out there. Here is a Fix:
- Head over to http://image_magick.veidrodis.com/image_magick/binaries/ and grab 6.5.4.6-Q16 (excellent mirror, THANKS!)
- Install on XAMPP machine to directory /XAMPP/ImageMagick/
- Ensure you have add path selected during install, or manually add path)
- Grab a matching DLL which you can find HERE (Linked to php_imagick.dll, TS on http://www.sk89q.com/2010/03/vc6-windows-binaries-for-imagick-2-3-0/)
- Edit your PHP.INI, uncomment or add-> extension=php_imagick.dll (php.ini found in xampproot/php/
- Stop apache, save work, restart machine
- You should have no error upon boot, if version mismatch ensure you have not had a prior version of Imagick installed
- Create a test script to ensure your running right
<?php$im = new Imagick();$im->newPseudoImage(1000, 1000, “magick:rose”);$im->setImageFormat(“png”);$im->roundCorners(12,8);$type=$im->getFormat();header(“Content-type: $type”);echo $im->getimageblob();?>
- Save as iTest.php, toss into directory and browse to, you now have Imagick running and a small image
- Paths you might ask? Let’s make one more needed file for any server that will give you php stats, call it info.php, toss into directory also, and browse to
- …… incase that is not clear enough /ImageMagick/
<?php
phpinfo();
?>
Now back to some actual work….
Actually, XAMPP 1.7.3 is not recommend for imagemagick which have been an issue of some user like Apache crash or connection reset since it used PHP 5.3.x instead of 5.2.x, they can downgrade to XAMPP 1.7.1 and it work flawlessly.
And I download Imagemagick-6.4.2.7, install to c:imagemagick be sure the system env PATH has c:imagemagick, then reboot PC. If you want to test, go to command line and type “convert”, you should help Imagemagick help options.
Some one said if you don’t reboot, you will see RL_Wand*.dll blah blah blah error when you start the apache because the windows have not update the env path.
Now get the php_imagemagick.dll extension which has compile with VC6, copy into “ext” folder in PHP and add the “extension=php_imagick.dll” to php.ini. Viola, it took me just 10 mins. Hope this help you much easier solution.
Right…. But the point is getting IMAGICK to work on 1.7.3, recommendations be damned
In case, if the above php_imagemagick.dll is not working.
You can get the correct dll here.
For those using PHP 5.2, should get it here:
http://valokuva.org/outside-blog-content/imagick-windows-builds/080709/
For PHP5.3 (I’m not sure if I had tried before):
http://valokuva.org/outside-blog-content/imagick-windows-builds/php53/
You should get any dll end with dyn Q16. If you got wrong dll, hope your breath and try another files till you get it right.
Finally, you should get it really working. I’ve it working on W7 64bits. I download Imagemagick in 32bits, not sure for 64bits.
Good article, thanks! On XAMPP 1.7.4 (PHP 5.3.5, PHP Extension Build API20090626,TS,VC6 ) works too.
Thanks! I’d gone over numerous tutorials on getting Xampp to play nicely with Imagick.
One of the DLLs linked in James’ comment (#2) worked for me. I’m on Windows 7 64bit, with 32bit Imagick installed and using Xampp 1.6.8.
Btw, I copied the copied the DLL both the /ext and /extensions directory … unsure in which one its supposed to go.
Yes the version of Windows can be negated by using the newest compiled version, check out the link below in the comments for a vc9 updated version. Woots
I am using xampp 1.7.3
I followed tutorial at the very beginning.
Pleae check out the newest build compiled in vc9 , if your stuck on a legacy build for some reason then let me know.
Original post worked for me. Thanks. I am using XAMPP 1.7.3
The above tutorial works perfectly to install Image Magick, and Imagick on XAMPP. None of the comments were helpful for me.
for xampp 1.7.7 on Win7 this was true:
http://www.apachelounge.com/viewtopic.php?t=4029
SVG images are not rendering (i.e., displaying) in an XAMPP Lite 1.7.1 Wiki. The following appears:
400 300 http://localhost/mediawiki/images/Section1/FO-1.svg
you can click on the link (i.e., http://localhost/mediawiki/images/Section1/FO-1.svg), and the image appears. But it doesn’t appear automatically on the Wiki page.
The application uses XAMPP 1.7.1, php 5.2.9, ImageMagick 6.8.0 and 6.3.2 (both don’t render .svg files).
Hi
Actually am using XAMPP 1.7.4 PHP: 5.3.5 .. I installed the dll of 5.3.2.0 version .. When i run the code am the Apache error.
Thanks. But unfortunately the links to the imagemagick-Files are down. I use xampp 1.8.3 on windows 7 32bit and I really don’t know how to get it to run 🙁
I faced Fatal error: Class ‘imagick’ not found in C:xampphtdocs. I tried the procedure below, somehow still in error situation.
1. I have XAMPP 1.8.3 ,[PHP: 5.5.3], I tried installed ImageMagick-6.6.5-4-Q16-windows-dll, ImageMagick-6.7.7-5-Q16-windows-dll.
2. download and put php_imagick.dll in xampp/php/ext/
3. add extension=php_imagick.dll in php INI file.
4. stop apache, it display PHP Startup:imagick: Unable to initialize module Module compiled with module API=20100525 PHP compiled with module API=20121212 These options need to match