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.
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.
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\"");
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.