Running ImageMagick on XAMPP 1.8.3 with Windows 7

Solution 1:

OK. I finally found a combination that works. After MUCH trial and error, I was finally able to get the below combination to work on my machine. Hopefully it works for anyone else who might be struggling with this.

  • OS: Windows 7 64 Bit
  • PHP: 5.5.6
  • XAMPP: 1.8.3
    • Compiler: MSVC11
    • Architecture: x86
  • ImageMagick: ImageMagick-6.7.7-5-Q16-windows-dll (available here)
  • Imagick DLL: PHP5.5.x version from http://www.peewit.fr/imagick/

Note: Once I tried this, Apache started without any error messages. I did not have to restart my computer (just restarted Apache). I do have ImageMagick installed in a directory that has no spaces in the name (as some have suggested that might be a problem with some installs). In my case, I installed it to c:\xampp\imagemagick.

Best of luck to you!

Solution 2:

Imagick is a PECL extension and the official windows.php.net site has compiled versions of PECL extensions.

Please download Imagick from: http://windows.php.net/downloads/pecl/releases/imagick/

And download ImageMagick from: http://windows.php.net/downloads/pecl/deps/

Please note, downloading Imagick from one site, and downloading ImageMagick from another site is likely to not work! This is because when Imagick is compiled it uses several settings that vary based on what versions of ImageMagick it is being compiled against.

FYI the maintainer of the Imagick extension recommends not running it inside Apache, but instead to run it as a background task through something like SupervisorD or cron. This is both for security and performance reasons.