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

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.webp

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.webp

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:
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.
 
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.
 
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.
 
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.
 
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
 
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.
 
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
 
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.webp


Thanks you
 
Top Bottom