Test for versions and locations of ImageMagick'; echo 'Path: convert
'; function alist ($array) { //This function prints a text array as an html list. $alist = ""; return $alist; } exec("convert -version", $out, $rcode); //Try to get ImageMagick "convert" program version number. echo "Version return code is $rcode
"; //Print the return code: 0 if OK, nonzero if error. echo alist($out); //Print the output of "convert -version" echo '
'; echo 'This should test for ImageMagick version 5.x
'; echo 'Path: /usr/bin/convert
'; exec("/usr/bin/convert -version", $out, $rcode); //Try to get ImageMagick "convert" program version number. echo "Version return code is $rcode
"; //Print the return code: 0 if OK, nonzero if error. echo alist($out); //Print the output of "convert -version" echo '
'; echo 'This should test for ImageMagick version 6.x
'; echo 'Path: /usr/local/bin/convert
'; exec("/usr/local/bin/convert -version", $out, $rcode); //Try to get ImageMagick "convert" program version number. echo "Version return code is $rcode
"; //Print the return code: 0 if OK, nonzero if error. echo alist($out); //Print the output of "convert -version"; ?>