Problems using ImageMagick with PHP under Windows Serv 2003

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
cjs1976
Posts: 2
Joined: 2014-02-28T12:09:52-07:00
Authentication code: 6789

Problems using ImageMagick with PHP under Windows Serv 2003

Post by cjs1976 »

Hi!

I need to use an old Windows Sever 2003. I am not allowed to make any updates, but I am allowed to install ImageMagick and I can do changes on the PHP installation. There is the newest Windows Version of PHP 5.4.25 installed. And I installed also the newest version of ImageMagick (ImageMagick-6.8.8-7-Q16-x86-dll.exe).

But I can't find an imagick.dll which is working with this installation. There is always an error when loadind the imagick.dll. I tried so many versions, also of the ImageMagick version itself. Noting worked.

I can call ImageMagick from the command line and everything works, but with PHP I am chanceless.

Is there anyone who can help me???

Thanks,
Christian.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Problems using ImageMagick with PHP under Windows Serv 2

Post by fmw42 »

Are you using PHP exec()? If so, you may need to provide the full path to IM convert in your command.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Problems using ImageMagick with PHP under Windows Serv 2

Post by Bonzo »

Imagick and windows is a minefield - using imagemagick and exec() in php is easier.
cjs1976
Posts: 2
Joined: 2014-02-28T12:09:52-07:00
Authentication code: 6789

Re: Problems using ImageMagick with PHP under Windows Serv 2

Post by cjs1976 »

Hi!

Thanks for the hints. I changed now to the exec() function.

My problem now: Wen I try the script on the command line as administrator, everything works fine. If I try it over an webbrowser, the exec() function doesn't work. I get no errors in the php error log or in the IIS error log!?!?

Any ideas?

Thanks,
Christian.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Problems using ImageMagick with PHP under Windows Serv 2

Post by Bonzo »

Seeing your code would be helpful.

I have never used a windows server but there could be a permissions problem? In apache you need to alter the folder permissions to 777 or 755 if you are saving an image.
What happens if you just use identify on an image?

This should print some details of the image you specify in the code:

Code: Select all

<?php  
system("convert image.jpg -identify "); 
 ?> 
Post Reply