PHP script unable to call ImageMagick

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
fr33d0m

PHP script unable to call ImageMagick

Post 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')";
Post Reply