Hi All,
Im really grasping at straws here. I realise this may not be the best place to post this thread, but am really having problems with this one.
I have a linux box with PHP, imagemagick and ghostscript installed.
When a user uploads a photo, its meant to get a copyright appended to the bottom of it. In other words, the script creates an black image of the same width, writes users name on the image, the appends that image to the bottom of the original uploaded image as the full image. Problem i have is as follows.
If i run the command:
/usr/local/bin/convert -font Arial.ttf -pen white -draw "text +5+15 TESTMESSAGE" /home/sites/site2/web/upload/temp/footers/testbefore.jpg /home/sites/site2/web/upload/temp/footers/after.jpg
It works fine. But as soon as i put it into a PHP script and try to run it from a webpage, i get the following in the apache error log:
sh: gs: command not found
sh: gs: command not found
/usr/local/bin/convert: Postscript delegate failed.
sh: gs: command not found
sh: gs: command not found
/usr/local/bin/convert: Postscript delegate failed.
/usr/local/bin/convert: Postscript delegate failed.
Even if i "su - httpd" on the box and run the first command, it works fine. The ONLY time it doesnt work is when i try to run it from a webpage.
Any help that anyone can shed on this would be greatly apprecaited.
Regards
Dave