How to install imagick for PHP

November 10th, 2009 by tech Leave a reply »

The imagick.so PHP module can’t currently be installed via PECL, due to it’s inability to write to /var/tmp. To get around that, you can install it manuall:

# yum install ImageM* netpbm gd gd-* libjpeg libexif gcc coreutils make
# cd /usr/local/src
# wget http://pecl.php.net/get/imagick-2.2.2.tgz
# tar zxvf ./imagick-2.2.2.tgz
# cd imagick-2.2.2
# phpize
# ./configure
# make
# make test
# make install

This will compile imagick.so, and move it to your extensions directory specified in php.ini. Now you’ll need to add the following to php.ini:

extension=imagick.so

and restart apache:

/scripts/restartsrv_httpd
  • Share/Bookmark
Post Sponsored by

2 comments

  1. JustME says:

    I wasn’t able to install it, I’m getting those errors :

    /usr/local/src/imagick-2.3.0/imagick_helpers.c: In function ‘php_imagick_validate_map’:
    /usr/local/src/imagick-2.3.0/imagick_helpers.c:133: warning: initialization discards qualifiers from pointer target type
    /usr/local/src/imagick-2.3.0/imagick_helpers.c: In function ‘initialize_imagick_constants’:
    /usr/local/src/imagick-2.3.0/imagick_helpers.c:910: error: ‘CosineEvaluateOperator’ undeclared (first use in this function)
    /usr/local/src/imagick-2.3.0/imagick_helpers.c:910: error: (Each undeclared identifier is reported only once
    /usr/local/src/imagick-2.3.0/imagick_helpers.c:910: error: for each function it appears in.)
    /usr/local/src/imagick-2.3.0/imagick_helpers.c:911: error: ‘SineEvaluateOperator’ undeclared (first use in this function)
    /usr/local/src/imagick-2.3.0/imagick_helpers.c:912: error: ‘AddModulusEvaluateOperator’ undeclared (first use in this function)
    make: *** [imagick_helpers.lo] Error 1

Trackbacks /
Pingbacks

  1. Imagemagick and PHP - cPanel Forums

Leave a Reply


cPanel Web Site Hosting by IntraHost