Page 1 of 1

PHP & ImageMagick (apache erroring out)

Posted: Tue Jul 08, 2003 3:38 pm
by boii
hey guys.

i've getting an odd error when trying to call mogrify from a php script (ive gotten it to work on various other systems but this has me baffled).

my relevant code is as follows:

Code: Select all

$mogrify="/home/virtual/site13/fst/usr/X11R6/bin/mogrify -geometry x123";
$path="/home/virtual/site13/fst/var/www/html/images/temp/$img_name";
exec($mogrify . " " . $path) or die ($mogrify . " " . $path);
when the script runs, it dies with:

Code: Select all

/home/virtual/site13/fst/usr/X11R6/bin/mogrify -geometry x123 /home/virtual/site13/fst/var/www/html/images/temp/P8110001.JPG
so i know the command is right. and i know the absolute paths are correct, becaus ethe other copy and mv calls with those paths work perfectly. and, when i use the above command from the prompt it resizes the file as it should.

apache's error_log spits out:

Code: Select all

sh: /mogrify: No such file or directory
i've tried using system wide (/usr/local/bin) versions of mogrify, as well as the above is the users personal version. i even went ahead thinkign apache couldnt access it by mv'ing it into apaches directory and chown'ing it appropriatley. still no go.

can anyone offer any insight?

cheers.
ken


?>