2
votes

I can't get PHP to recognize the ImageMagick (Imagick) class. Everything else works, the command line tests (convert logo: logo.miff | imdisplay logo.miff) work, and I've followed every instructions I could find over it. Maybe I'm doing something wrong?

Instructions I've done:

  1. Download and install ImageMagick-6.7.6-1-Q16-windows-dll.exe
  2. Download the PHP Imagick DLL: http://www.sk89q.com/2010/03/vc6-windows-binaries-for-imagick-2-3-0/
  3. Used IIS to install the extension (automatically add the dll reference to PHP.ini)
  4. Saved, and restarted the "World Wide Web Publishing Service" and IIS
  5. Checked phpinfo() to see if Imagick loaded, it had not.
  6. I restarted Windows, and checked phpinfo again, no luck.

Did I miss anything? I've tried everything, looked for multiple DLLs, using each one, restarting both the service, IIS and Windows. Still nothing has worked. Any help?

2
Have you checked the php.ini file? Open it in notepad to make sure the dll was automatically added. - sikander
It was. I even manually added it myself to make sure. Before anyone says anything, I've modified the PHP.ini before, and yes I'm changing the one that is loaded. - Tyler Isbell
Check your log files to see if it is attempting to load it and failing. Maybe incorrect path for example? - Jeremy Harris
It's not failing from what I can see. That's the problem. - Tyler Isbell

2 Answers

2
votes

You are downloading the wrong version if you are using PHP with Apache from apache.org you need to use the VC6 versions and using PHP with IIS you should use the VC9

I can see you are downloading http://www.sk89q.com/2010/03/vc6-windows-binaries-for-imagick-2-3-0/

I think you should download the VC9 version and see if it works

Thanks :)

2
votes

I finally got it. This is what I did.

  1. Downloaded ImageMagick-6.6.4-0-Q16-windows-dll.exe from: http://image_magick.veidrodis.com/image_magick/binaries/
  2. Downloaded the PHP dll from: http://valokuva.org/builds/ext/vc9/nts/imagick/2011-04-25_1849/
  3. Switched IIS to PHP Build 5.3.8
  4. Loaded the DLL by adding it to PHP.ini
  5. Restarted IIS
  6. Tested out the DLL by using a small script

Everything worked fine after that. Turns out it was just my ImageMagick build.