Page 1 of 1
Stops Converting via PHP but works via command line
Posted: 2010-07-02T18:52:47-07:00
by croeder
Imagemagick script executed via exec works for a while then just stops. If I take the command and execute it via command line it works fine. Anyone have any ideas what might cause the script not to work via the php script? Command is below that works via cmd line but not php script.
convert "
http://www.rvsearch.com/images/customer ... %20110.jpg" -resize 75 "/mnt/Cache/ts-rvs/customers/159815/582340/75_PPictures2009110.jpg"
Re: Stops Converting via PHP but works via command line
Posted: 2010-07-02T19:21:34-07:00
by fmw42
perhaps php does not give you adequate permissions or too short a time-out to process images from http access
Re: Stops Converting via PHP but works via command line
Posted: 2010-07-04T23:10:13-07:00
by anthony
Does it find the "convert" command?
What does the PHP errors say?
Have as look at methods of handling and looking at errors in PHP
http://www.cit.griffith.edu.au/~anthony ... /php.hints
I squirrelled these notes for a local user when I looked at PHP error handling on our systems (student teaching servers).
Re: Stops Converting via PHP but works via command line
Posted: 2010-07-05T20:28:52-07:00
by croeder
After adding the -debug all,trace to the command I get "no data returned `
http://www.rvsearch.com/images/customer ... %20110.jpg'". The problem is that if I go to the URL directly it works fine. Another thing is that it will work for a while before it stops working. Its almost like ImageMagick wasn't able to get the image at some time and it cached that response using it going forward instead of re-trying the request.
Re: Stops Converting via PHP but works via command line
Posted: 2010-07-05T21:36:20-07:00
by fmw42
try clearing the cache or temporary files from your browser
Re: Stops Converting via PHP but works via command line
Posted: 2010-07-06T07:18:30-07:00
by croeder
The caching for this page is explicitly set to non-cacheable. Even after clearing the cache and tmp the convert cmd fails.
Re: Stops Converting via PHP but works via command line
Posted: 2010-07-22T18:21:05-07:00
by fmw42
I still suspect a timeout issue or more likely a security issue under PHP.