-2

I install Imagick according this tutorial: http://www.imagemagick.org/script/install-source.php#unix

I used this code:

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"

And the result:

Version return code is 0 Version: ImageMagick 6.9.0-0 Q16 x86_64 2014-12-24 http://www.imagemagick.org Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC Features: DPC OpenMP Delegates (built-in): bzlib djvu fontconfig freetype jng jpeg lcms pangocairo png tiff x xml zlib

And Also this code:

if(extension_loaded('imagick')) {
    echo 'Imagick Loaded';
}
else
    echo 'Imagick Not Loaded';

ANd the result:

Imagick Not Loaded

Also I couldn't see anything about Imagick (except: with-imagick=/usr/local') in phpinfo();


I am on CentOS 6.5 and php5.4 (a VPS server)

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
ali raha
  • 71
  • 1
  • 2
  • 7

1 Answers1

2

Try

rpm -qa|grep ImageMagick

A blank response means it's not installed.

Edit: you may be getting hung up on getting a test to work, when you don't know that it's a good test. You started off wanting convert to work - which is part of Image Magick - and you've confirmed that it does. Can you tell us what your real problem is?

MadHatter
  • 79,770
  • 20
  • 184
  • 232
  • Thanks. It give me ImageMagick and ImageMagick-devel version...Do I must anything more to load class in php? I added 'extension = imagick.so ' in php.ini – ali raha Dec 24 '14 at 18:56