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