Page 1 of 1

ImageMagick on Windows through PHP exec()

Posted: 2008-07-27T05:37:09-07:00
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!

Re: ImageMagick on Windows through PHP exec()

Posted: 2008-07-27T06:24:24-07:00
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.

Re: ImageMagick on Windows through PHP exec()

Posted: 2008-07-28T04:30:46-07:00
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.