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.

Good way to install imagemagick and imagick

Discussion in 'General Discussion' started by Oliver Swing, Oct 5, 2011.

  1. Oliver Swing

    Oliver Swing Registered

    Joined:
    Oct 1, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    I have traveled the forum but but I have not found any clear explanation on the instalation on imagemagick and imagick

    Imagemagick :

    scripts/installimagemagick

    Error :
    Successfully installed Image-Magick-6.72
    1 distribution installed
    &Image::Magick::constant not defined. The required ImageMagick libraries are not installed or not installed properly.
    END failed--call queue aborted.
    ImageMagick install failed

    Solution :

    => vi scripts/checkimagemagick

    Change:
    my $maxmem = ( 128 * ( 1024 * 1024 ) );
    to:
    my $maxmem = ( 512 * ( 1024 * 1024 ) );

    but this has not solved the problem (taht is seems we have to by pass ...)

    imagick

    WHM > Software > Module Installers > PHP Pecl > Manage. Do a search for "imagick" then install it. Restart Apache via WHM

    ERROR :

    The imagick.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20090626


    Solution :

    cd /usr/local/lib/php/extensions/no-debug-non-zts-20090626
    ln -s /usr/lib/php/extensions/no-debug-non-zts-20090626/imagick.so

    but this has not solved the problem
     
    #1 Oliver Swing, Oct 5, 2011
    Last edited: Oct 5, 2011
  2. Oliver Swing

    Oliver Swing Registered

    Joined:
    Oct 1, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Solution imagick ...

    it's work :)))

    you can copy the file in the good directory, it 's working fine too ;)
     
  3. sadistiko

    sadistiko Member

    Joined:
    Oct 31, 2011
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Can you explain this please!
    I installed imagemagick and imagick pecl, it shows in phpinfo after I made this:
    but imagick actually doesn't work. If I try some code that uses library I get this error:
    Where is located imagick? /user/bin? or something other?

    My config:
    WHM/cpanel 11.30.5
    CentOS 6.0 (32bit)
    php 5.2.17
    Apache: 2.2.21
    ImageMagick 6.7.1-7
    imagick 3.0.1

    If I enter php -m I get imagick on the list (so I suppose it's properly installed)
     
    #3 sadistiko, Dec 2, 2011
    Last edited: Dec 2, 2011
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Could you try installing imagick again and use this command:

    Code:
    pecl install imagick
    Then restart Apache to see if you are able to call the function you need to call?
     
  5. sadistiko

    sadistiko Member

    Joined:
    Oct 31, 2011
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Still nothing. :mad:
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Could you submit a ticket in WHM > Support Center > Contact cPanel or using the link in my signature so we can check that the proper php.ini details are being called by that script or account? While we cannot troubleshoot coding for you, we can ensure imagick is properly installed.
     
  7. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I've replied to your ticket 2044486 about the issue. Imagick is definitely installed in the global php.ini file per a phpinfo page I loaded on the account. I believe the issue is the code itself as I tried the following script that worked on your account:

    Code:
    <?php
    
    try
    {
            /*** the image file ***/
            $image = 'image.jpg';
    
            /*** a new imagick object ***/
            $im = new Imagick();
    
            /*** ping the image ***/
            $im->pingImage($image);
    
            /*** read the image into the object ***/
            $im->readImage( $image );
    
            /*** thumbnail the image ***/
            $im->thumbnailImage( 100, null );
    
            /*** Write the thumbnail to disk ***/
            $im->writeImage( 'testimage.jpg' );
    
            /*** Free resources associated with the Imagick object ***/
            $im->destroy();
    
            echo 'Thumbnail Created';
    }
    catch(Exception $e)
    {
            echo $e->getMessage();
    }
    
    ?>
    Here image.jpg was in the /home/username/public_html/subdirectory you have where that image.jpg file did exist. The script called the image to read it, then it resized it to /home/username/public_html/subdirectory/testimage.jpg file.

    I obtained the script for testing at PHP Tutorials Examples Imagick
     
  8. sadistiko

    sadistiko Member

    Joined:
    Oct 31, 2011
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks Tristan!
    Can just say where is located imagemagic?
    /usr/bin
    or something else?
     
  9. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    Try:
    which convert

    and:
    convert --help
     
  10. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    On my machine:

    Code:
    root@host [~]# which convert
    /usr/bin/convert
    root@host [~]# convert --version
    Version: ImageMagick 6.7.2-9 2011-09-28 Q16 http://www.imagemagick.org
    Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
    Features: OpenMP   
    Of note, this isn't the same as Imagick, which is the PHP module. That is in the directory you symlinked earlier:

    /usr/local/lib/php/extensions/no-debug-non-zts-20090626/imagick.so
    /usr/lib/php/extensions/no-debug-non-zts-20090626/imagick.so
     
  11. sadistiko

    sadistiko Member

    Joined:
    Oct 31, 2011
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks Tristan, but then I'm not sure why in Xoops module - Forum CBB if I put /usr/bin/convert for path to imagemagick it sais there is no imagemagick.

    settings:

     
  12. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    If you use:

    Code:
    convert --version
    Do you get a return? Also, if you run "which convert" do you get a return of /usr/bin/convert?

    I'd actually suggest contacting Xoops otherwise, since that isn't a cPanel product and the code I used did most assuredly work for PHP's Imagick module, which again differs from ImageMagick.
     
  13. sadistiko

    sadistiko Member

    Joined:
    Oct 31, 2011
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I'll try to see with module developer is there something wrong with this module settings

    If I run convert --version I get:
    /usr/bin/convert
     
Loading...

Share This Page