PHP exec() hangs, Error 500
Posted
by MRX_II
on Stack Overflow
See other posts from Stack Overflow
or by MRX_II
Published on 2009-09-22T14:31:58Z
Indexed on
2010/05/13
17:04 UTC
Read the original article
Hit count: 185
So, my plan is to make small thumbnails of URL's with PHP and IECapt. IECapt works well, a nice command line tool, gets the full sized image of specified URL in 1 to 4 seconds. But my problem is to execute it trough PHP. This is the code I've trying to get working:
exec('IECapt.exe ' . escapeshellarg($URL) . ' ' . escapeshellarg($Filename))
$URL is of course the URL, and $filename is a simplified version of the URL.
Sometimes I get the IECapt to snap the image(trough PHP), but it takes awfully long (30-60s), and in the end I always get a 500-error, with no error messages to tell me what's wrong. Both variables are fine, they work manually with commandline:
IECapt http://google.com Google.png
My server set-up is IIS7 and PHP5.2.9, if relevant. (Windows Vista, all on my personal computer, so full access.)
Any ideas?
© Stack Overflow or respective owner