Page 1 of 1

PHP script unable to call ImageMagick

Posted: 2007-07-29T18:38:32-07:00
by fr33d0m
Hi, i've just reinstalled my ImageMagick when suddenly all my PHP scripts can call ImageMagick command.
Prior to this i manage to resize image and put a text on a photo by using convert command.
I'm able to run the command from command line, but PHP scripts failed to run the command.
Can someone help me to solve this problem, pls?
Thanks in advance..
Below is part of my PHP script :

Code: Select all

$watermarkFile = $watermarkDir . basename($targetWatermark);
//Create a watermark file from homepage photo size.
exec("convert " . $homeFile . " -font Arial -pointsize 80 -fill rgba(85%,85%,85%,0.5) -gravity southeast -annotate +0+0 \"". $name ."\" ". $watermarkFile);

//Insert Watermark Photo to database
$queryPhoto = "INSERT INTO Photo_Location (Photo_No, File_Type, File_Name) ";
$queryPhoto .= "VALUES('$photoNo', 'Watermarked_Photo', '$targetWatermark')";