I have been trying for hours to get ImageMagick working on my localhost (running XAMPP 1.8.3 on Windows 7). I have checked and tried literally every solution that I can find on this website, and dozens of others. Nothing works. No matter what combination of ImageMagick builds and imagick DLLs I try, I always get some kind of "can't find dll" error when I try to start Apache (the specific message varies based on what combination I'm trying, but it's always some sort of missing DLL message). Can anyone just give me a (moderately recent) combination of XAMPP/ImageMagick/Imagick that works?
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:xamppimagemagick.
Best of luck to you!
You have to add
extension=imagick.so in your
You can do some thing like this for the fastest way:
php -i | grep 'php.ini'
The result is like that:
Loaded Configuration File => /usr/local/lib/php.ini
<?php phpinfo(); ?> from some php file to get this information :)
One solution seems to be to downgrade imagemagick:
There's a debian bug (#638409) opened about this, seems to be caused by imagemagick's use of openmp:
Since we have this problem ourselves, we will be trying both solutions shortly :)
In the past this has worked by installing
ImageMagick and then downloading a compatible
imagick PHP extension.
But currently there seems to be a temporary "Catch 22" situation with
imagick versions need to be compiled against a specific version of
ImageMagick and currently that has not been done for
imagick against the new
ImageMagick 7 although I am informed by @danack that
imagick is ready to be compiled but nobody has done so yet, or at least they have not shared the binary.
ImageMagick do not retain older versions of their install i.e.
ImageMagick 6.? so if you dont already have a version of the installer the only availaible one is
The Catch 22
Therefore the only versions of
imagick available will only work with
ImageMagick 6 and you cannot download
ImageMagick 6 as the
ImageMagick people do not retain old version of their installer.
The work around
However, if you only want ImageMagick to work within a PHP/Apache environment this proceedure works.
The versions of the following must match your WAMPServer, so if you installed WAMPServer 32bit use the 32bit versions of ImageMagick and Imagick, if you use WAMPServer 64bit, use the 64bit versions of ImageMagick and Imagick. The VC14 versions should work with WAMPServers Apache 2.4.x versions
http://windows.php.net/downloads/pecl/deps/depending upon which WAMPServer version you are using i.e. 32bit or 64bit
http://windows.php.net/downloads/pecl/releases/imagick/3.4.3/depending upon which WAMPServer version you are using i.e. 32bit or 64bit
Create a folder to hold ImageMagick, I used
Unzip whichever of the ImageMagick's you downloaded i.e.
Unzip whichever of the imagick version you downloaded
php_imagick-3.4.3-5.6-ts-vc11-x64.zip(64bit) into a temp folder and copy the
php_imagick.dllfrom the temp folder to your
Edit your 'php.ini
file to add the extension. Use the wampmanager menus so you edit the correct file (left click) wampmanager->PHP->php.ini Add the lineextension=php_imagick.dll
into the section ofphp.ini
that contains the otherextension` parameters.
Add the folder to your windows PATH using Control Panel -> System -> Advanced System Setting Select the Advanced Tab Click the Environment Variables Button Add
C:wampimagick;to the PATH variable in the
System Variablessection [I dont like adding anything to the PATH for WAMPServer, but I cannot think of a better solution for now and as this way will work for multiple versions of PHP it is not actually so bad]
Start WAMPServer, or restart Apache. It may be necessary to reboot windows, it was for me, but maybe that was because I tried a number of things before I got to this solution.
phpinfo() you should see
You probably installed ImageMagick 7.X on your machine. This version no longer includes
convert.exe and the error that you are receiving is from the convert command of Windows. You can use
magick.exe instead or select
Install legacy utilities (e.g. convert) during the installation to install
convert.exe on your machine..