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"
Stops Converting via PHP but works via command line
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Stops Converting via PHP but works via command line
perhaps php does not give you adequate permissions or too short a time-out to process images from http access
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Stops Converting via PHP but works via command line
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).
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).
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Stops Converting via PHP but works via command line
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.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Stops Converting via PHP but works via command line
try clearing the cache or temporary files from your browser
Re: Stops Converting via PHP but works via command line
The caching for this page is explicitly set to non-cacheable. Even after clearing the cache and tmp the convert cmd fails.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Stops Converting via PHP but works via command line
I still suspect a timeout issue or more likely a security issue under PHP.