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.

Imagemagick and PHP

Discussion in 'General Discussion' started by Mat-d-rat, Mar 23, 2010.

  1. Mat-d-rat

    Mat-d-rat Well-Known Member

    Joined:
    Jul 30, 2003
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    I used the script /scripts/installimagemagick and from prompt command "convert -version" reports "Version: ImageMagick 6.4.8 2010-03-22 Q16 OpenMP http://www.imagemagick.org Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC" - All good so far. But I can't see how to get the "Imagick class" working in php. I see no .so files for imagemagic or imagick, what am I missing?
     
  2. Mat-d-rat

    Mat-d-rat Well-Known Member

    Joined:
    Jul 30, 2003
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Ok, look slike I need to run "pecl install Imagick"..
    BUT I can't as I have my temp partition set with noexec! I tried "mount -o remount,rw,exec,nosuid /temp", no errors, but mount -l shows it with noexec still, what next?
     
  3. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The PECL module installer in WHM will setup the proper tmp paths for you.

    Recent versions of imagick have a bug that prevents successful installation when the installed version of ImageMagick is < 6.5.0. See for example:

    PECL :: Bug #17016 :: Compile Error
    PECL :: Bug #16863 :: Won't build with imagemagick version > 6.4.3 and < 6.5.0

    To get imagick installed one must either use version 2.2.2 of imagick or manually patch imagick_helpers.c in the imagick distribution.

    This document explains how to install imagick 2.2.2:

    How to install imagick for PHP | cPanel Admins

    Please note that you can ignore the yum install step as /scripts/installimagemagick already did that for you.
     
  4. Mat-d-rat

    Mat-d-rat Well-Known Member

    Joined:
    Jul 30, 2003
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Had to enable proc_open in php to install (disabled it now will see what happens) but all running. THANK YOU!
     
  5. Mat-d-rat

    Mat-d-rat Well-Known Member

    Joined:
    Jul 30, 2003
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Well bum, I need version > 6.3.6 bad 6.2.8 is installed. Clues welcome :(
     
  6. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    That's odd. What is your operating system and cPanel version number?

    Executing /scripts/installimagemagick on a test server resulted in ImageMagick 6.4.8-2 being installed. The version installed by that script should be from the tarball in /usr/local/cpanel/src/3rdparty/gpl

    EDIT:
    Actually after re-reading your initial post, you do have 6.4.8-2 of ImageMagick installed. What is telling you that you have 6.2.8 installed?
     
    #6 cPanelKenneth, Mar 24, 2010
    Last edited: Mar 24, 2010
  7. Mat-d-rat

    Mat-d-rat Well-Known Member

    Joined:
    Jul 30, 2003
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Your right, I made an "asss"umption! The reason being is that I'm trying to use
    PHP: Imagick::distortImage - Manual whch requires 6.3.6 - yet I get "Fatal error: Call to undefined method ImagickDraw::distortImage()"... other functions and tests seem to work

    BTS Thanks :)
     
    #7 Mat-d-rat, Mar 24, 2010
    Last edited: Mar 24, 2010
  8. ReiJu

    ReiJu Well-Known Member

    Joined:
    Mar 14, 2008
    Messages:
    57
    Likes Received:
    1
    Trophy Points:
    6
    Hi,

    I'm sorry if my post here seems to hijack thread starter's problem. But since the howto is explained here, I think it's unwise to start another thread.

    I followed the howto from How to install imagick for PHP | cPanel Admins, and everything successfully installed without error (some warning though). Checked /usr/local/lib/php/extensions/no-debug-non-zts-20060613/, and imagick.so is installed there. I added the line extension="imagick.so" in /usr/lib/php.ini and in my per-site-php.ini (under public_html). To make sure, I restarted apache several times.

    But it's so odd, that I can't see any imagick or ImageMagick mentioned in phpinfo().

    Is there something that I might missed? I even recompile apache and php (easyapache), but nothing changed. Imagick still absent from phpinfo.

    Maybe I need to look at some other configs?

    Here's my system summary:
    RHEL 5.5
    Apache 2.2.15
    PHP 5.2.13 (suPHP)
    ImageMagick 6.2.8.0-4.el5_1.1 (from rpm -a), 6.5.7-10 (from convert --version)

    Thank you.
     
  9. MikeDVB

    MikeDVB Well-Known Member
    PartnerNOC

    Joined:
    Jun 4, 2008
    Messages:
    212
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Indiana, USA
    I've always just added the binary directory to the open_basedir directive and used the binaries directly myself.
     
  10. DomineauX

    DomineauX Well-Known Member
    PartnerNOC

    Joined:
    Apr 12, 2003
    Messages:
    414
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page