I have installed imagick version:6.8.6-7 on my PC Operating system:Windows 7 32-bit
Now i want to use Imagick for my PHP project.I am using Wampserver which provides me PHP version:5.3.10.So i also installed a .dll file,made changes in php.ini,verified if the path is set with php_info() before using Imagick class and everything was ok.
Problem description: I wrote the script to test if i can use Imagick.Following is the script:
<?PHP
function alist ($array) { //This function prints a text array as an html list.
$alist = "<ul>";
for ($i = 0; $i < sizeof($array); $i++) {
$alist .= "<li>$array[$i]";
}
$alist .= "</ul>";
return $alist;
}
exec("convert -version", $out, $rcode); //Try to get ImageMagick "convert" program version number.
echo "Version return code is $rcode <br>"; //Print the return code: 0 if OK, nonzero if error.
echo alist($out); //Print the output of "convert -version"
if(class_exists("imagick") )
{
echo "Ready to use Imagick class";
}
else
{
echo "Cannot use Imagick class";
}
?>
Output
Version return code is 0
Version: ImageMagick 6.8.6-7 2013-07-23 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib djvu fftw fontconfig freetype jng jp2 jpeg lcms lzma openexr pango png ps tiff x xml zlib
Cannot use Imagick class
So even if the Version is properly displayed,i am not able to use Imagick class.How to fix this,help