human growth hormone side effects
Webmaster Resources
 

How to install php-imagick on CentOS 5

Thursday Sep 8, 2011

ImageMagick is a software suite to create, edit, compose or convert bitmap images. To use this utility in PHP, you’ll need to install ImageMagick Linux package and also build and install a PHP extension.

Prerequisite for installing imagick PHP extension is php-pear and gcc packages, so let’s get those packages installed.

# yum install php-pear gcc

Now, that you have php-pear and gcc, you may install ImageMagick packages.

# yum install ImageMagick ImageMagick-devel
# pecl install imagick

Note: You’ll not be able to run pecl if you don’t have php-pear package installed. To compile imagick, you’ll need a GCC compiler as well.

By running the command, you’ll install ImageMagick and PHP extension module imagick.so in the /usr/lib/php/modules folder. If you have a 64-bit machine, the modules directory will be /usr/lib64/php/modules.

Edit the /etc/php.d/imagick.ini, and add the following line.

extension=imagick.so

Restart apache, by …

# service httpd restart

That’s all there is to it.

Did you like this? Share it:
Leave a Reply

Comment

*