ImageMagick on Windows through PHP exec()

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
jasonhoward

ImageMagick on Windows through PHP exec()

Post by jasonhoward »

It is said that on windows using the double ^^ is needed to achieve results, since ^ is the escape character. I have did some research on this matter and found out that when run directly through commandline, it works perfectly.

However, when used in a PHP exec() command, it does not work. Neither with a single nor with a double ^

Until now I have not been able to find out why and how to overcome this problem.

Maybe some of you guys know the answer?

Would be grand!
jasonhoward

Re: ImageMagick on Windows through PHP exec()

Post by jasonhoward »

Wrong alarm! Grrr..

The reason for the problem was that when i called IM through commandline, it used the newer version. However, since i was unclean enough not to uninstall the old version before reinstalling the new one, for some reason, php called the old version, when used with exec(). Therefore the ^ operator did not work.

I uninstalled the old version, but PHP still did not want to join in. After rebooting the machine though, PHP used the new IM version. Now things are fine.

Thread closed.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: ImageMagick on Windows through PHP exec()

Post by anthony »

PHP was probably running as a existing process, as part of the webserver. A fast restart of the web server should have achieved the same result.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply