1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

ImageMagick PECL does not work Open Litespeed (Two php versions installed)

Discussion in 'Server Configuration and Hosting' started by Marcus, Sep 25, 2013.

  1. Marcus

    Marcus Well-Known Member

    ImageMagick is not selectable in admin.php?options/list/attachments and I do not find it in phpini.php. I installed it and "$ identify" works. This is the install:

    Code:
    # yum install php-devel php-pear ImageMagick ImageMagick-devel
    # pecl install imagick
    I added extension=imagick.so to the end of my CentOs 6 Open Litespeed php 5.5.1 php configuration file located in /usr/local/lsws/lsphp5/lib/php.ini
    upload_2013-9-25_11-20-4.png

    I copied imagick.so to /usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20121212 as this directory seems to be the correct one for extensions
    upload_2013-9-25_11-18-19.png

    Checked whether PECL is installed
    Code:
    # pecl install imagick
    pecl/imagick is already installed and is the same as the released version 3.1.2
    install failed
    phpinfo.php displays version 5.5.1 which I compiled from Open Litespeed panel
    # php -info displays version 5.3.3

    Obviously I have two php installations. How could I remove the old one and make the new one standard?
     
    Last edited: Sep 25, 2013
  2. Marcus

    Marcus Well-Known Member

    Solution: /usr/local/lsws/lsphp5/bin/pecl install imagick
     
    HWS likes this.
  3. vinafix

    vinafix Active Member

    downloading imagick-3.3.0.tgz ...

    Starting to download imagick-3.3.0.tgz (179,978 bytes)

    ......................................done: 179,978 bytes

    17 source files, building

    running: phpize

    Can't find PHP headers in /usr/include/php

    The php-devel package is required for use of this command.

    ERROR: `phpize' failed

    I help thanks you.
     
  4. Tracy Perry

    Tracy Perry Well-Known Member

    That tells you right there what you need to install. You are missing dependencies.
    How you install it will depend on what OS you are using.
     
  5. vinafix

    vinafix Active Member

    Centos 6 & PHP 5.6

    Thanks you
     
  6. vinafix

    vinafix Active Member

    downloading imagick-3.3.0.tgz ...

    Starting to download imagick-3.3.0.tgz (179,978 bytes)

    .....done: 179,978 bytes

    17 source files, building

    running: phpize

    Configuring for:

    PHP Api Version: 20131106

    Zend Module Api No: 20131226

    Zend Extension Api No: 220131226

    Please provide the prefix of Imagemagick installation [autodetect] :

    building in /var/tmp/pear-build-rootlfTkmQ/imagick-3.3.0

    running: /var/tmp/imagick/configure --with-php-config=/usr/bin/php-config --with-imagick

    checking for grep that handles long lines and -e... /bin/grep

    checking for egrep... /bin/grep -E

    checking for a sed that does not truncate output... /bin/sed

    checking for cc... no

    checking for gcc... no

    configure: error: in `/var/tmp/pear-build-rootlfTkmQ/imagick-3.3.0':

    configure: error: no acceptable C compiler found in $PATH

    See `config.log' for more details.

    ERROR: `/var/tmp/imagick/configure --with-php-config=/usr/bin/php-config --with-imagick' failed


    I'm stuck here.
     
  7. Tracy Perry

    Tracy Perry Well-Known Member

    I know with the 5.5 line I had to so something like
    Code:
    yum --enablerepo=remi,remi-php55 install php55-devel 
    - that was before I began using @eva2000's CentMin Mod.
     
  8. Tracy Perry

    Tracy Perry Well-Known Member

    You are missing several devel packages then. Did you set your CentOS system up for compiling programs? If not, you need to research that and do so.
     
  9. vinafix

    vinafix Active Member

    I setup have devel done:

    error next:

    downloading imagick-3.3.0.tgz ...
    Starting to download imagick-3.3.0.tgz (179,978 bytes)

    .....done: 179,978 bytes

    17 source files, building

    running: phpize

    Configuring for:

    PHP Api Version: 20131106

    Zend Module Api No: 20131226

    Zend Extension Api No: 220131226

    Please provide the prefix of Imagemagick installation [autodetect] :

    building in /var/tmp/pear-build-rootlfTkmQ/imagick-3.3.0

    running: /var/tmp/imagick/configure --with-php-config=/usr/bin/php-config --with-imagick

    checking for grep that handles long lines and -e... /bin/grep

    checking for egrep... /bin/grep -E

    checking for a sed that does not truncate output... /bin/sed

    checking for cc... no

    checking for gcc... no

    configure: error: in `/var/tmp/pear-build-rootlfTkmQ/imagick-3.3.0':

    configure: error: no acceptable C compiler found in $PATH

    See `config.log' for more details.

    ERROR: `/var/tmp/imagick/configure --with-php-config=/usr/bin/php-config --with-imagick' failed


    I'm stuck here.

    Thanks you
     
  10. Tracy Perry

    Tracy Perry Well-Known Member

    As I said, you haven't set up your system to allow compiling of packages
    Code:
    configure: error: no acceptable C compiler found in $PATH
    You need to do that first.
     
  11. The Forum Heroes

    The Forum Heroes Well-Known Member

    yum install gcc*
     
  12. The Forum Heroes

    The Forum Heroes Well-Known Member

    I would also do

    yum groupinstall "Development Tools"
    and
    yum install php-pear php-devel httpd-devel pcre-devel make

    Also before installing imagick you need Image Magick

    yum install ImageMagick* ImageMagick-devel

    So do all above steps before trying to install imagick
     
  13. vinafix

    vinafix Active Member

    OK

    Build process completed successfully

    Installing '/usr/lib64/php/modules/imagick.so'

    Installing '/usr/include/php/ext/imagick/php_imagick_shared.h'

    install ok: channel://pecl.php.net/imagick-3.3.0

    configuration option "php_ini" is not set to php.ini location

    You should add "extension=imagick.so" to php.ini


    What do I do next ?

    No checks
    Screen Shot 2015-12-10 at 2.42.49 PM.png


    Thanks you
     
  14. The Forum Heroes

    The Forum Heroes Well-Known Member

    Your answer can be found in there.. You really need to read your errors..
     
    RoldanLT likes this.
  15. RoldanLT

    RoldanLT Well-Known Member

    :D
     

Share This Page