Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed ImageMagick php library in my ubuntu server using the following command:

apt-get install php5-gd php5-idn php-pear php5-imagick

I could find the ImageMagick module shown in file, but when I tried to use it's function in my php program, it doesn't seems to be working and even I don't have any errors too.

Please Help, I am a new user.

Thanks in advance

share|improve this question
What function? What Ubuntu/PHP versions? Older versions will not have support for new features. – Zoredache Sep 25 '10 at 8:42
Thanks for your imm. reply. I am using Ubuntu 10.04 LTS and PHP 5.3.2-1. I could see imagemagick enabled in, but when I try to run any function of imagemagick for uploading and resizing image function, I don't get any output. Tried with a following small code too: <?php $resource = NewMagickWand(); MagickReadImage( $resource, 'image.jpg' ); header( 'Content-Type: image/jpeg' ); MagickEchoImageBlob( $resource ); $width = MagickGetImageWidth( $resource ); $height = MagickGetImageHeight( $resource ); echo "Image size, in pixels, is: width $width x height $height"; ?> – user55260 Sep 25 '10 at 10:02

Install php5-cli

apt-get install php5-cli

Test php5-imagick:

php /usr/share/doc/php5-imagick/examples/polygon.php > ~/polygon.png
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.