Getting ImageMagick (Imagick) installed on XAMPP 1.7.3

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:

<?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….

21 thoughts on “Getting ImageMagick (Imagick) installed on XAMPP 1.7.3

  1. James

    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.

  2. James

    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.

  3. Pingback: 3 Steps to get ImageMagick on XAMPP 1.7.3 | Articulating ideas

  4. Pingback: Imagick and XAMPP | Jyll L Stuart

  5. Jaffer Haider

    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.

    1. admin Post author

      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

  6. Pingback: Imagick and XAMPP | Jyll Stuart

  7. karthikphp

    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.

  8. Frank

    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 🙁

  9. Emeryn

    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

Leave a Reply

Your email address will not be published. Required fields are marked *