views:

16

answers:

2

I'm issuing the following command

convert /path/to/image.jpg +repage "/path/output.jpg"

it works perfectly fine from the command line, but i'm running it from php and its just not working, no output whatsoever.

A: 

Check security execution settings in your PHP.ini file, you must have disabled safe_mode, then this code was will working good.

echo exec("/path/to/convert /path/to/image.jpg +repage \"/path/output.jpg\"");
Svisstack
A: 

The user running the web server process (which is almost certainly not the user that owns the script) needs to have write permissions to the destination path.

Alternatively, check out this: http://www.php.net/manual/en/book.imagick.php

You can do the processing right in PHP and avoid the ugly system() call completely.

Alex Howansky
yeah i have the imagick extension installed, unfortunately this is a hideously complicated shell script which i can't do via the extension
mononym