Why does mogrify on WAMP hang?

158 Views Asked by At

Got a bit of a challenge here. We're running a PHP script via Apache that allows users to upload images using their browser. The script attempts to use mogrify to down-scale the images once uploaded. Mogrify is called using PHP's exec() function, e.g. like this:

exec('C:\PROGRA~1\ImageMagick-6.8.6-Q16\mogrify.exe -resize "93x125!" "C:\WINDOWS\Temp\cpm10C4"');

For some reason, the exec() function won't resume to the next line in the script. It just stops there.

I've tried to execute the command manually at the command line, which works fine, and I've also tried running the script from the command line. Works like a charm. It is only when run through Apache it'll cramp up like this.

The Windows Task Manager shows that each request from the browser to the script produces a mogrify.exe process which just hangs there, taking up no CPU.

This is all happening on a Windows Server 2003.

Any idea what might be going on? Google isn't very helpful in this case.

1

There are 1 best solutions below

0
On

Great! Two minutes ago everything just magically started working again. No idea why. Moon phase, solar winds, fate, karma... who knows.

I'm glad we're moving the whole thing onto a LAMP platform.

So, thanks for your attention, and never mind :-P