I am using a php script with the exec commands for imagemagick and if I run the script in a browser it works perfectly. But if I run it through a cron job imagemagick fails to create the image. And I know the cron job is working because the script also sends me an email.
I suspect it has something to do with relative vs. direct paths to the images, but I can't seem to figure it out.
This code works when the script is run manually.
Code: Select all
exec("/usr/bin/convert ./large/test.png -resize 55% ./small/test.png");
Code: Select all
exec("/usr/bin/convert /var/www/vhosts/<domain>/httpdocs/large/test.png -resize 55% /var/www/vhosts/<domain>/httpdocs/small/test.png");