The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to install / enable ImageMagick on CentOS / cPanel/WHM ???

Discussion in 'General Discussion' started by crazyaboutlinux, Oct 8, 2011.

  1. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    how to install / enable ImageMagick on CentOS / cPanel/WHM ???
    I have installed imagick using following steps
    How to install imagick for PHP
    How to install imagick for PHP | cPanel Admins

    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

    # php -i | grep php.ini (will show the location)
    # echo “extension=”imagick.so”" >> /your/path/php.ini

    it seems it has been successfully installed but, its not showing in phpinfo page


    -bash-3.2# /usr/bin/convert -h
    Version: ImageMagick 6.2.8 10/20/10 Q16 file:/usr/share/ImageMagick-6.2.8/doc/index.html
    Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC

    following image is not showing in phpinfo page
    imagick.png
     
    #1 crazyaboutlinux, Oct 8, 2011
    Last edited: Oct 8, 2011
  2. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    any update guys ??
     
  3. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    386
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    Hi,

    Did you try /scripts/installimagemagick ?

    Thank you,
    Nibin.
     
  4. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    root@server[~]# /scripts/installimagemagick
    ImageMagick installed ok


    it is already installed, just need to know how do i make these extension usable ???

    its not showing in www.example.com/phpinfo.php page

    what to do ???
     
    #4 crazyaboutlinux, Oct 11, 2011
    Last edited: Oct 11, 2011
  5. flashweb

    flashweb Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    243
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    You don't see it in phpinfo as it is not a php module.

    It is a binary software, you can find it in /usr/bin/convert
     
  6. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    I have installed this software myself using the steps mentioned in my starting thread, but it was not showing in phpinfo so i asked our DC to check this, they had did something & asked us to check & it is showing now . then i logged into the server & ran "history" command to check what hi did but it is not showing history. I need to do the same in my other server so i post here to know what to do to see ImageMagick in phpinfo
     
    #6 crazyaboutlinux, Oct 12, 2011
    Last edited: Oct 12, 2011
  7. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    386
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    Hello,

    Run, pecl install imagick and try again.

    Post us the result back here...

    Thank you,
    Nibin.
     
  8. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    root@server [~]# pecl install imagick
    downloading imagick-3.0.1.tgz ...
    Starting to download imagick-3.0.1.tgz (93,920 bytes)
    .....................done: 93,920 bytes
    Could not get contents of package "/root/tmp/pear/cache/imagick-3.0.1.tgz". Invalid tgz file.
    Download of "pecl/imagick" succeeded, but it is not a valid package archive
    Error: cannot download "pecl/imagick"
    Download failed
    install failed
     
  9. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    root@server[~]# echo "extension=imagick.so" > /etc/php.d/imagick.ini
    -bash: /etc/php.d/imagick.ini: No such file or directory
     
  10. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    when i ran /usr/bin/convert -version it is showing below
    -bash-3.2# /usr/bin/convert -version
    Version: ImageMagick 6.2.8 10/20/10 Q16 file:/usr/share/ImageMagick-6.2.8/doc/index.html
    Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC


    Features: OpenMP

    & when i ran php -m | grep imagick it doesn't shown anything
     
    #10 crazyaboutlinux, Oct 14, 2011
    Last edited: Oct 14, 2011
  11. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    386
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    Hello,

    I am really not sure why the percl command shows that error....perhaps you can do an offline installation as follows

    cd /root
    wget http://pecl.php.net/get/imagick-3.0.1.tgz
    pear install --offline imagick-3.0.1.tgz

    Check the phpinfo again then..

    Thank you,
    Nibin.
     
  12. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    Why isn't everybody simply using /scripts/installimagemagick - this is cpanel-supported and entirely effortless.
     
  13. storminternet

    storminternet Well-Known Member

    Joined:
    Nov 2, 2011
    Messages:
    462
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Indeed. It is recommended method to install imagemagic on cPanel server.
     
  14. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    For whoever finds this thread looking for this detail, /scripts/imagemagick installs imagemagick into /usr/bin
     
  15. ovisopa

    ovisopa Member

    Joined:
    Apr 12, 2007
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Yesterday I tried to rebuild apache using EasyApache and it failed, contacted cPanel support for help and they fixed it quick.

    Today I noticed I don;t have anymore Imagick support, and I tried to install it using /scripts/imagemagick but it failed, in fact it installed succesfuly the ImageMagick but it failed installing the Imagick extension

    Code:
    /root/tmp/pear/imagick/imagick_class.c:9534: error: 'CHECKUID_NO_ERRORS' undeclared (first use in this function)
    make: *** [imagick_class.lo] Error 1
    ERROR: `make' failed
    The imagick.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20100525
    Tidying /usr/local/lib/php.ini...
    No changes
    Tidying /usr/local/cpanel/3rdparty/php/53/etc/php.ini...
    No changes
    root@secure2 [~]# /usr/bin/convert -h
    Version: ImageMagick 6.2.8 05/07/12 Q16 file:/usr/share/ImageMagick-6.2.8/doc/index.html
    Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC
    
    I also tried than to run # pecl install imagick but also failed like this

    Code:
     cc -I. -I/root/tmp/pear/imagick -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootwasPDX/imagick-3.0.1/include -I/root/tmp/pear/pear-build-rootwasPDX/imagick-3.0.1/main -I/root/tmp/pear/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/imagick/imagick_class.c  -fPIC -DPIC -o .libs/imagick_class.o
    /root/tmp/pear/imagick/imagick_class.c: In function âzim_imagick_setfontâ:
    /root/tmp/pear/imagick/imagick_class.c:1442: error: âstruct _php_core_globalsâ has no member named âsafe_modeâ
    /root/tmp/pear/imagick/imagick_class.c:1442: error: âCHECKUID_CHECK_FILE_AND_DIRâ undeclared (first use in this function)
    /root/tmp/pear/imagick/imagick_class.c:1442: error: (Each undeclared identifier is reported only once
    /root/tmp/pear/imagick/imagick_class.c:1442: error: for each function it appears in.)
    /root/tmp/pear/imagick/imagick_class.c:1442: error: âCHECKUID_NO_ERRORSâ undeclared (first use in this function)
    /root/tmp/pear/imagick/imagick_class.c: In function âzim_imagick_setimageprogressmonitorâ:
    /root/tmp/pear/imagick/imagick_class.c:9534: error: âstruct _php_core_globalsâ has no member named âsafe_modeâ
    /root/tmp/pear/imagick/imagick_class.c:9534: error: âCHECKUID_CHECK_FILE_AND_DIRâ undeclared (first use in this function)
    /root/tmp/pear/imagick/imagick_class.c:9534: error: âCHECKUID_NO_ERRORSâ undeclared (first use in this function)
    make: *** [imagick_class.lo] Error 1
    ERROR: `make' failed
    
    Any ideea what I can do to make it work ASAP ?
    Thank you.
     
  16. ovisopa

    ovisopa Member

    Joined:
    Apr 12, 2007
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    After a few hours I got an reply from tech support, the old script to install imagick doesn't work anymore as the latest stable version of Imagick is not compatible with the latest PHP version (5.4.17), you need to install the beta using these two commands :

    pear config-set preferred_state beta
    pecl install imagick
     
  17. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Excellent, thanks!
     
Loading...

Share This Page