I'm running Ubuntu with PHP5.
I've got this PHP script:
Code: Select all
<?php
exec("/usr/local/bin/convert DSP_7201.JPG -resize 546x274^ -quality 80 temp.jpg");
?>
I thought that it was because www-data doesn't have the same permissions that my regular user does, so I did "sudo visudo" and first tried adding "www-data ALL=NOPASSWD: /usr/local/bin/convert" to the last line, and that didn't work, so then I tried "www-data ALL=NOPASSWD: ALL" and that still didn't work. So now I'm not sure if it's a permission issue at all.
Also, I've tried using the chown command to give the www-data user permissions for the directory I'm working out of, and I've also chmodded that directory to 777. Still no luck.
Then, I looked in my apache error log, and I'm getting this error:
Code: Select all
convert: unable to open image 'temp.jpg': @ error/blob.c/OpenBlob/2584
Suggestions?