Topic: Replacing core ImageMagick with remi ImageMagick7 trouble

I don't think this is a problem with the Remi repo's, just a problem of mine trying to use them.  I have a Centos 7.2 system managed by cPanel, with:
ImageMagick-6.7.8.9-15.el7_2.x86_64

My problem is that lcms is not installed as a delegate for Imagick, so any color profile conversions I try, fail, as mentioned at https://stackoverflow.com/questions/474 … ofile?rq=1

$ convert -list configure | grep DELEGATES
DELEGATES     bzlib fontconfig freetype gs jpeg jng jp2 lzma openexr pango png rsvg tiff x11 xml wmf zlib

The solution is reported at https://forums.cpanel.net/threads/confi … 2.638349/:
"I just downloaded ImageMagick 7 rpms via cmd line wget, installed with yum, and then reinstalled the PECL Imagemagick extension wrapper and restarted php-fpm"

I think we should be able to use the Remi repositories to get the required software, no?  So I installed (for the first time) the remi repo for Centos 7, and tried:

(Aplogies but when I use the <> code toolbar icon, I see "PUNBB is not defined" in the Console):
# yum remove ImageMagick
Loaded plugins: fastestmirror, universal-hooks
Resolving Dependencies
--> Running transaction check
---> Package ImageMagick.x86_64 0:6.7.8.9-15.el7_2 will be erased
--> Processing Dependency: ImageMagick = 6.7.8.9-15.el7_2 for package: ImageMagick-devel-6.7.8.9-15.el7_2.x86_64
--> Processing Dependency: ImageMagick = 6.7.8.9-15.el7_2 for package: ImageMagick-c++-6.7.8.9-15.el7_2.x86_64
--> Processing Dependency: libMagickCore.so.5()(64bit) for package: ImageMagick-devel-6.7.8.9-15.el7_2.x86_64
--> Processing Dependency: libMagickCore.so.5()(64bit) for package: ImageMagick-c++-6.7.8.9-15.el7_2.x86_64
--> Processing Dependency: libMagickCore.so.5()(64bit) for package: inkscape-0.92.2-2.el7.x86_64
--> Processing Dependency: libMagickWand.so.5()(64bit) for package: ImageMagick-devel-6.7.8.9-15.el7_2.x86_64
--> Processing Dependency: libMagickWand.so.5()(64bit) for package: ImageMagick-c++-6.7.8.9-15.el7_2.x86_64
--> Running transaction check
---> Package ImageMagick-c++.x86_64 0:6.7.8.9-15.el7_2 will be erased
---> Package ImageMagick-devel.x86_64 0:6.7.8.9-15.el7_2 will be erased
---> Package inkscape.x86_64 0:0.92.2-2.el7 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================
Package                   Arch           Version                  Repository     Size
=======================================================================================
Removing:
ImageMagick               x86_64         6.7.8.9-15.el7_2         @base         7.6 M
Removing for dependencies:
ImageMagick-c++           x86_64         6.7.8.9-15.el7_2         @base         527 k
ImageMagick-devel         x86_64         6.7.8.9-15.el7_2         @base         435 k
inkscape                  x86_64         0.92.2-2.el7             @base          68 M

Transaction Summary
=======================================================================================
Remove  1 Package (+3 Dependent packages)

Installed size: 77 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Erasing    : inkscape-0.92.2-2.el7.x86_64                                        1/4
  Erasing    : ImageMagick-devel-6.7.8.9-15.el7_2.x86_64                           2/4
  Erasing    : ImageMagick-c++-6.7.8.9-15.el7_2.x86_64                             3/4
  Erasing    : ImageMagick-6.7.8.9-15.el7_2.x86_64                                 4/4
  Verifying  : inkscape-0.92.2-2.el7.x86_64                                        1/4
  Verifying  : ImageMagick-6.7.8.9-15.el7_2.x86_64                                 2/4
  Verifying  : ImageMagick-devel-6.7.8.9-15.el7_2.x86_64                           3/4
  Verifying  : ImageMagick-c++-6.7.8.9-15.el7_2.x86_64                             4/4

Removed:
  ImageMagick.x86_64 0:6.7.8.9-15.el7_2                                               

Dependency Removed:
  ImageMagick-c++.x86_64 0:6.7.8.9-15.el7_2                                           
  ImageMagick-devel.x86_64 0:6.7.8.9-15.el7_2                                         
  inkscape.x86_64 0:0.92.2-2.el7                                                       

Complete!
</code>


Then install ImageMagick7:


<code>
# yum --enablerepo=remi install ImageMagick7
Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
* EA4: 109.203.100.185
* cpanel-addons-production-feed: 109.203.100.185
* base: mirror.ox.ac.uk
* epel: mirror.bytemark.co.uk
* extras: mirrors.clouvider.net
* remi: mirror.netweaver.uk
* remi-safe: mirror.netweaver.uk
* updates: mirror.bytemark.co.uk
Resolving Dependencies
--> Running transaction check
---> Package ImageMagick7.x86_64 0:7.0.8.15-1.el7.remi will be installed
--> Processing Dependency: ImageMagick7-libs(x86-64) = 7.0.8.15-1.el7.remi for package: ImageMagick7-7.0.8.15-1.el7.remi.x86_64
--> Processing Dependency: libMagickWand-7.Q16HDRI.so.6(VERS_6.0)(64bit) for package: ImageMagick7-7.0.8.15-1.el7.remi.x86_64
--> Processing Dependency: libfftw3.so.3()(64bit) for package: ImageMagick7-7.0.8.15-1.el7.remi.x86_64
--> Processing Dependency: libMagickCore-7.Q16HDRI.so.6()(64bit) for package: ImageMagick7-7.0.8.15-1.el7.remi.x86_64
--> Processing Dependency: libMagickWand-7.Q16HDRI.so.6()(64bit) for package: ImageMagick7-7.0.8.15-1.el7.remi.x86_64
--> Processing Dependency: libraqm.so.0()(64bit) for package: ImageMagick7-7.0.8.15-1.el7.remi.x86_64
--> Running transaction check
---> Package ImageMagick7-libs.x86_64 0:7.0.8.15-1.el7.remi will be installed
--> Processing Dependency: libcdt.so.5()(64bit) for package: ImageMagick7-libs-7.0.8.15-1.el7.remi.x86_64
--> Processing Dependency: libcgraph.so.6()(64bit) for package: ImageMagick7-libs-7.0.8.15-1.el7.remi.x86_64
--> Processing Dependency: libgvc.so.6()(64bit) for package: ImageMagick7-libs-7.0.8.15-1.el7.remi.x86_64
--> Processing Dependency: libopenjp2.so.7()(64bit) for package: ImageMagick7-libs-7.0.8.15-1.el7.remi.x86_64
--> Processing Dependency: libraw.so.5()(64bit) for package: ImageMagick7-libs-7.0.8.15-1.el7.remi.x86_64
---> Package fftw-libs-double.x86_64 0:3.3.3-8.el7 will be installed
---> Package libraqm.x86_64 0:0.1.1-1.el7 will be installed
--> Running transaction check
---> Package LibRaw.x86_64 0:0.14.8-5.el7.20120830git98d925 will be installed
---> Package graphviz.x86_64 0:2.30.1-21.el7 will be installed
--> Processing Dependency: libXaw.so.7()(64bit) for package: graphviz-2.30.1-21.el7.x86_64
---> Package openjpeg2.x86_64 0:2.3.0-6.el7 will be installed
--> Running transaction check
---> Package libXaw.x86_64 0:1.0.13-4.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================
Package               Arch       Version                               Repository
                                                                                  Size
=======================================================================================
Installing:
ImageMagick7          x86_64     7.0.8.15-1.el7.remi                   remi      82 k
Installing for dependencies:
ImageMagick7-libs     x86_64     7.0.8.15-1.el7.remi                   remi     2.2 M
LibRaw                x86_64     0.14.8-5.el7.20120830git98d925        base     250 k
fftw-libs-double      x86_64     3.3.3-8.el7                           base     759 k
graphviz              x86_64     2.30.1-21.el7                         base     1.3 M
libXaw                x86_64     1.0.13-4.el7                          base     192 k
libraqm               x86_64     0.1.1-1.el7                           epel      12 k
openjpeg2             x86_64     2.3.0-6.el7                           epel     153 k

Transaction Summary
=======================================================================================
Install  1 Package (+7 Dependent packages)

Total download size: 4.9 M
Installed size: 17 M
Is this ok [y/d/N]: y
Downloading packages:
(1/8): LibRaw-0.14.8-5.el7.20120830git98d925.x86_64.rpm         | 250 kB  00:00:00     
warning: /var/cache/yum/x86_64/7/remi/packages/ImageMagick7-7.0.8.15-1.el7.remi.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
Public key for ImageMagick7-7.0.8.15-1.el7.remi.x86_64.rpm is not installed
(2/8): ImageMagick7-7.0.8.15-1.el7.remi.x86_64.rpm              |  82 kB  00:00:00     
(3/8): fftw-libs-double-3.3.3-8.el7.x86_64.rpm                  | 759 kB  00:00:00     
(4/8): graphviz-2.30.1-21.el7.x86_64.rpm                        | 1.3 MB  00:00:00     
(5/8): libXaw-1.0.13-4.el7.x86_64.rpm                           | 192 kB  00:00:00     
(6/8): libraqm-0.1.1-1.el7.x86_64.rpm                           |  12 kB  00:00:00     
(7/8): openjpeg2-2.3.0-6.el7.x86_64.rpm                         | 153 kB  00:00:00     
(8/8): ImageMagick7-libs-7.0.8.15-1.el7.remi.x86_64.rpm         | 2.2 MB  00:00:01     
---------------------------------------------------------------------------------------
Total                                                     3.6 MB/s | 4.9 MB  00:01     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Importing GPG key 0x00F97F56:
Userid     : "Remi Collet <RPMS@FamilleCollet.com>"
Fingerprint: 1ee0 4cce 88a4 ae4a a29a 5df5 004e 6f47 00f9 7f56
Package    : remi-release-7.5-2.el7.remi.noarch (installed)
From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libraqm-0.1.1-1.el7.x86_64                                          1/8
  Installing : fftw-libs-double-3.3.3-8.el7.x86_64                                 2/8
  Installing : LibRaw-0.14.8-5.el7.20120830git98d925.x86_64                        3/8
  Installing : openjpeg2-2.3.0-6.el7.x86_64                                        4/8
  Installing : libXaw-1.0.13-4.el7.x86_64                                          5/8
  Installing : graphviz-2.30.1-21.el7.x86_64                                       6/8
  Installing : ImageMagick7-libs-7.0.8.15-1.el7.remi.x86_64                        7/8
  Installing : ImageMagick7-7.0.8.15-1.el7.remi.x86_64                             8/8
  Verifying  : ImageMagick7-7.0.8.15-1.el7.remi.x86_64                             1/8
  Verifying  : graphviz-2.30.1-21.el7.x86_64                                       2/8
  Verifying  : fftw-libs-double-3.3.3-8.el7.x86_64                                 3/8
  Verifying  : libraqm-0.1.1-1.el7.x86_64                                          4/8
  Verifying  : libXaw-1.0.13-4.el7.x86_64                                          5/8
  Verifying  : openjpeg2-2.3.0-6.el7.x86_64                                        6/8
  Verifying  : LibRaw-0.14.8-5.el7.20120830git98d925.x86_64                        7/8
  Verifying  : ImageMagick7-libs-7.0.8.15-1.el7.remi.x86_64                        8/8

Installed:
  ImageMagick7.x86_64 0:7.0.8.15-1.el7.remi                                           

Dependency Installed:
  ImageMagick7-libs.x86_64 0:7.0.8.15-1.el7.remi                                       
  LibRaw.x86_64 0:0.14.8-5.el7.20120830git98d925                                       
  fftw-libs-double.x86_64 0:3.3.3-8.el7                                               
  graphviz.x86_64 0:2.30.1-21.el7                                                     
  libXaw.x86_64 0:1.0.13-4.el7                                                         
  libraqm.x86_64 0:0.1.1-1.el7                                                         
  openjpeg2.x86_64 0:2.3.0-6.el7                                                       

Complete!
</code>

But as soon as I restarted httpd I could not instantiate the Imagick class:

[09-Dec-2018 13:10:35 UTC] PHP Fatal error:  Class 'Imagick' not found in /home/xxx/xxx/xxx.php on line xxx

Fortunately the lcms delegate was now found by the command line tools, where it was not before:

$ convert -list configure | grep DELEGATES
DELEGATES             bzlib djvu mpeg fftw fontconfig freetype gslib jbig jng jpeg lcms lzma openexr openjp2 pango png ps raw raqm rsvg tiff webp wmf x xml zlib

But, as the PHP code cannot instantiate Imagick, the system is useless.

I was able to `yum remove ImageMagick7` and `yum install ImageMagick` and the system started working again.

Is my problem to do with the PECL manager, so after installing the remi ImageMagick7 package I just need some other command line commands to enable the PHP bindings, or are there some other RPM packages I'm missing?  I've queried the current system and there aren't any packages with "pecl" in their name at all.

Re: Replacing core ImageMagick with remi ImageMagick7 trouble

I see in the Wizard some advice, but the "replacing base packages" bit scares me, because normally this system is 'controlled' by cPanel, and I have never been sure what that means and how I might break cPanel if I mess around with things.

"You want a single version which means replacing base packages from the distribution

Packages have the same name than the base repository, ie php-*

Some common dependencies are available in remi-safe repository, which is enabled by default

PHP version 5.6 packages are available for CentOS 7 in remi-php56 repository"

Did my attempt to use ImageMagick7 from remi fail because I did not try to enable remi-php56 or replace my core PHP packages?

I am doing this on a production system, and I am very worried that I will break something irretrievably.  My next approach would be to install a VM locally of Centos 7.2 and try these things, but as I have nothing immediately handy this is work I'd rather avoid... but maybe the only way to be at least partially sure of success.. then just the cPanel questions remaining smile

Re: Replacing core ImageMagick with remi ImageMagick7 trouble

FYI I've started a thread at https://forums.cpanel.net/threads/image … gs.643353/ where I mention some yum exclusions I found, blocking "php*" from being installed.  It seems their package naming scheme differs from the core naming scheme, and they have blocked core named packages like php-pecl-imagick from being installed.

So it seems this problem I have on my cPanel server isn't your (remi) responsibility, which is fine.  The other threads I have found have involved someone wanting ImageMagick7 because of CVE, which cPanel knocked down saying the fix was backported into the ImageMagick 6 package already installed, and someone advising installing everything from source, which I really don't want to do for obvious reasons (aside from the shift of security responsibility to myself, I'm quite likely to b0rk my production system due to its cPanel weirdness and not know how to recover it).

Being such a newbie with packaging naming strategies and the long term thought behind cPanel and Centos and Remi, I hope some experts can chime in smile

Re: Replacing core ImageMagick with remi ImageMagick7 trouble

Indeed, you have to use imagick extension from my repository.

BTW with upstream agreement, we still prefer IM 6, which have tons of deprecated features, until a new version will be release, with a deprecated message for PHP user, and then later switch to IM 7 without all these feature.

=> https://github.com/mkoppanen/imagick/pull/186

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: Replacing core ImageMagick with remi ImageMagick7 trouble

Thank you.  I don't know how to use the imagick extension from your repository, am I correct that the exclusions I see in the yum config would prevent these extensions being installed?

I have read about some features being deprecated, and perhaps this will bite me, too.

To be honest, I don't _need_ IM7, I just _need_ an IM with the lcms delegate available.  As I reported, I did find that IM7 from remi seemed to come 'with' the lcms delegate available, though I do not understand the plumbing that makes it available.  If I can find an ImageMagick that is compatible with my system, but has lcms, I think I would be fine with ImageMagick 6.

If I can somehow install ImageMagick packages from remi, instead of core, and get IM6 with lcms, then I'll be very happy.  I can try that tomorrow before UK core hours on the production system and see how it goes.  Maybe I just need something like:

yum --enablerepo=remi install ImageMagick

yet this gives me:

# yum --enablerepo=remi install ImageMagick
Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                     |  29 kB     00:00     
* EA4: 109.203.100.185
* cpanel-addons-production-feed: 109.203.100.185
* base: mirror.econdc.com
* epel: mirror.netweaver.uk
* extras: mirror.netweaver.uk
* remi: mirror.netweaver.uk
* remi-safe: mirror.netweaver.uk
* updates: mirror.netweaver.uk
EA4                                                      | 2.9 kB     00:00     
cpanel-addons-production-feed                            | 2.9 kB     00:00     
MariaDB102                                               | 2.9 kB     00:00     
base                                                     | 3.6 kB     00:00     
cpanel-plugins                                           | 2.9 kB     00:00     
epel                                                     | 3.2 kB     00:00     
extras                                                   | 3.4 kB     00:00     
google-chrome                                            | 1.3 kB     00:00     
newrelic                                                 | 2.5 kB     00:00     
r1soft                                                   |  951 B     00:00     
remi                                                     | 3.0 kB     00:00     
remi-safe                                                | 3.0 kB     00:00     
updates                                                  | 3.4 kB     00:00     
(1/4): epel/x86_64/updateinfo                              | 938 kB   00:00     
(2/4): remi-safe/primary_db                                | 1.4 MB   00:00     
(3/4): epel/x86_64/primary                                 | 3.6 MB   00:00     
(4/4): remi/primary_db                                     | 2.3 MB   00:00     
epel                                                                12738/12738
Package ImageMagick-6.7.8.9-15.el7_2.x86_64 already installed and latest version
Nothing to do

I can see in http://rpms.remirepo.net/enterprise/7/remi/x86_64/ there is ImageMagick6-6.9.10.15-1.el7.remi.x86_64.rpm so I will try removing my current ImageMagick and installing this ImageMagick6 package tomorrow out of core hours.

Cheers!

Re: Replacing core ImageMagick with remi ImageMagick7 trouble

> I see in the yum config would prevent these extensions being installed?

Sorry, but I can't help you with a cpanel distribution (which is far different from a CentOS distribution)

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: Replacing core ImageMagick with remi ImageMagick7 trouble

Yes, cPanel really seem to have done a number on their packaging smile I understand you cannot help with problems due to their packaging, but I do not know if my problem using your ImageMagick6 package is due to cPanel or my own misunderstanding.

I have tried replacing the original ImageMagick package with your ImageMagick6 and ImageMagick6-libs ones, and joy of joys, the lcms delegate is now found:

# yum --enablerepo=remi install ImageMagick6
# convert -list configure | grep DELEGATES
DELEGATES      bzlib djvu mpeg fftw fontconfig freetype gslib jbig jng jpeg lcms lzma openexr openjp2 pango png ps raqm raw rsvg tiff webp wmf x xml zlib

But the PHP extension isn't found, after restarting httpd and php-fpm I get the "PHP Fatal error:  Class 'Imagick' not found", and I have had to dig around to try to learn how the imagick extension is found.

It still seems to be configured properly, with:

[root@whuk-46266 etc]# grep imagick /opt/cpanel/ea-php56/root/etc/*/*
php.d/zzzzzzz-pecl.ini:extension="/opt/cpanel/ea-php56/root/usr/lib64/php/modules/imagick.so"

and this file exists on disk, yet strangely is not owned by any package.

# ls -l /opt/cpanel/ea-php56/root/usr/lib64/php/modules/imagick.so
-rw-r--r-- 1 root root 1289528 Jun 23  2017 /opt/cpanel/ea-php56/root/usr/lib64/php/modules/imagick.so

# rpm -q --whatprovides /opt/cpanel/ea-php56/root/usr/lib64/php/modules/imagick.so
file /opt/cpanel/ea-php56/root/usr/lib64/php/modules/imagick.so is not owned by any package

With your ImageMagick6 and ImageMagick6-libs package installed, ldd shows that some .so required by imagick.so are not found:

# ldd -v /opt/cpanel/ea-php56/root/usr/lib64/php/modules/imagick.so
ldd: warning: you do not have execution permission for `/opt/cpanel/ea-php56/root/usr/lib64/php/modules/imagick.so'
        linux-vdso.so.1 =>  (0x00007ffdebf34000)
        libMagickWand.so.5 => not found
        libMagickCore.so.5 => not found
        libc.so.6 => /lib64/libc.so.6 (0x00007f6474eb9000)
        /lib64/ld-linux-x86-64.so.2 (0x0000555835c4f000)

        Version information:
        /opt/cpanel/ea-php56/root/usr/lib64/php/modules/imagick.so:
                libc.so.6 (GLIBC_2.14) => /lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
        /lib64/libc.so.6:
                ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
                ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2

With the core ImageMagick-6.7.8.9-15.el7_2.src.rpm package installed these libraries are packaged and found, e.g.:

# rpm -ql ImageMagick | grep libMagic
/usr/lib64/libMagickCore.so.5
/usr/lib64/libMagickCore.so.5.0.0
/usr/lib64/libMagickWand.so.5
/usr/lib64/libMagickWand.so.5.0.0

# ldd -v /opt/cpanel/ea-php56/root/usr/lib64/php/modules/imagick.so  | grep libMagic
ldd: warning: you do not have execution permission for `/opt/cpanel/ea-php56/root/usr/lib64/php/modules/imagick.so'
        libMagickWand.so.5 => /lib64/libMagickWand.so.5 (0x00007ffa546d5000)
        libMagickCore.so.5 => /lib64/libMagickCore.so.5 (0x00007ffa5422c000)
        /lib64/libMagickWand.so.5:
        /lib64/libMagickCore.so.5:

And checking ImageMagick6-libs:
# rpm -ql ImageMagick6-libs | grep libMagic
/usr/lib64/libMagickCore-6.Q16.so.6
/usr/lib64/libMagickCore-6.Q16.so.6.0.0
/usr/lib64/libMagickWand-6.Q16.so.6
/usr/lib64/libMagickWand-6.Q16.so.6.0.0

so it seems I need a new imagick.so file that links against the libMagickCore etc libraries.  I edited yum.ini to temporarily remove the php* exclusion and installed the remi php-pecl-imagick package:

@@@@@@
# yum --enablerepo=remi install php-pecl-imagick
Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                     |  32 kB     00:00     
* EA4: 109.203.100.185
* cpanel-addons-production-feed: 109.203.100.185
* base: mirror.bytemark.co.uk
* epel: mirror.bytemark.co.uk
* extras: mirror.bytemark.co.uk
* remi: mirror.netweaver.uk
* remi-safe: mirror.netweaver.uk
* updates: mirror.bytemark.co.uk
EA4                                                      | 2.9 kB     00:00     
cpanel-addons-production-feed                            | 2.9 kB     00:00     
MariaDB102                                               | 2.9 kB     00:00     
base                                                     | 3.6 kB     00:00     
cpanel-plugins                                           | 2.9 kB     00:00     
epel                                                     | 3.2 kB     00:00     
extras                                                   | 3.4 kB     00:00     
google-chrome                                            | 1.3 kB     00:00     
newrelic                                                 | 2.5 kB     00:00     
r1soft                                                   |  951 B     00:00     
remi                                                     | 3.0 kB     00:00     
remi-safe                                                | 3.0 kB     00:00     
updates                                                  | 3.4 kB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package php-pecl-imagick.x86_64 0:3.4.3-9.el7.remi.5.4 will be installed
--> Processing Dependency: php(api) = 20100412-64 for package: php-pecl-imagick-3.4.3-9.el7.remi.5.4.x86_64
--> Processing Dependency: php(zend-abi) = 20100525-64 for package: php-pecl-imagick-3.4.3-9.el7.remi.5.4.x86_64
--> Running transaction check
---> Package php-common.x86_64 0:5.4.45-16.el7.remi will be installed
--> Processing Dependency: libzip.so.2()(64bit) for package: php-common-5.4.45-16.el7.remi.x86_64
--> Running transaction check
---> Package libzip.x86_64 0:0.10.1-8.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package               Arch        Version                      Repository
                                                                           Size
================================================================================
Installing:
php-pecl-imagick      x86_64      3.4.3-9.el7.remi.5.4         remi      185 k
Installing for dependencies:
libzip                x86_64      0.10.1-8.el7                 base       48 k
php-common            x86_64      5.4.45-16.el7.remi           remi      928 k

Transaction Summary
================================================================================
Install  1 Package (+2 Dependent packages)

Total size: 1.1 M
Total download size: 185 k
Installed size: 8.0 M
Is this ok [y/d/N]: y
Downloading packages:
php-pecl-imagick-3.4.3-9.el7.remi.5.4.x86_64.rpm           | 185 kB   00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libzip-0.10.1-8.el7.x86_64                                   1/3
  Installing : php-common-5.4.45-16.el7.remi.x86_64                         2/3
  Installing : php-pecl-imagick-3.4.3-9.el7.remi.5.4.x86_64                 3/3
==========================================================================

WARNING : PHP 5.4 have reached its "End of Life" in September 2015.
Even, if this package includes some of the important security fix,
backported from 5.5 or 5.6,
The UPGRADE to a maintained version is very strongly RECOMMENDED.

==========================================================================
  Verifying  : libzip-0.10.1-8.el7.x86_64                                   1/3
  Verifying  : php-common-5.4.45-16.el7.remi.x86_64                         2/3
  Verifying  : php-pecl-imagick-3.4.3-9.el7.remi.5.4.x86_64                 3/3

Installed:
  php-pecl-imagick.x86_64 0:3.4.3-9.el7.remi.5.4                               

Dependency Installed:
  libzip.x86_64 0:0.10.1-8.el7      php-common.x86_64 0:5.4.45-16.el7.remi     

Complete!
@@@@@@


This gives me a good .so that links properly against the ImageMagick6-libs (and there are no more 'not found' lines):

# ldd -v /usr/lib64/php/modules/imagick.so  | grep libMagic
        libMagickWand-6.Q16.so.6 => /lib64/libMagickWand-6.Q16.so.6 (0x00007f164ef25000)
        libMagickCore-6.Q16.so.6 => /lib64/libMagickCore-6.Q16.so.6 (0x00007f164ea5a000)
        /lib64/libMagickWand-6.Q16.so.6:
        /lib64/libMagickCore-6.Q16.so.6:

So I edited /opt/cpanel/ea-php56/root/etc/php.d/zzzzzzz-pecl.ini to point to this imagick.so instead of the old one.. restarted apache and php-fpm .. but still get the 'Class not found' error, and no sign of imagick in phpinfo() output.  The /opt/cpanel/ea-php56/root/etc/php.d/zzzzzzz-pecl.ini file is listed in phpinfo() "Additional .ini files parsed".

I see no errors in error_log or on the httpd restart command line.

I really thought that would fix it, but something is still missing.  Pretty frustrating smile

Re: Replacing core ImageMagick with remi ImageMagick7 trouble

>  Installing : php-pecl-imagick-3.4.3-9.el7.remi.5.4.x86_64                 3/3
> /opt/cpanel/ea-php56/root/etc/php.d/zzzzzzz-pecl.ini

You have installed the imagick extension for 5.4 while running PHP 5.6... this can NOT work.

BTW, according to ini name, it seems cPanel build imagick from sources (using the pecl command), so you have to remove, re-install (which will rebuild it using the installed library)


P.S. looks like cPanel installation are a real mess...

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: Replacing core ImageMagick with remi ImageMagick7 trouble

Ah that's what the 5.4 means.  Yes I saw the warning while installing but I guess I had my rose tinted spectacles on.

Looks like I should try again but with remi-php56 enabled, to get http://rpms.remirepo.net/enterprise/7/p … agick.html

However your comments about removing and re-installing led me to cPanel's PECL management GUI which lets me run a 're-install' operation for the imagick pecl, which downloads a imagick-3.4.3.tgz (it doesn't say where from), runs `configure` where it detects libs MagickWand and MagickCore, and `make install`.  So it looks like if I just install remi ImageMagick6-devel and friends, then run the PECL re-install operation for imagick, I would not need to install remi-php56 php-pecl-imagick at all.  I can re-build the PECL and it will link against the libMagickWand etc that configure finds on the disk.

Unless of course the LIBDIR locations aren't what the configure script is expecting in which case I predict a quick failure smile

Will try in tomorrow's out of hours maintenance window. Thank you!

Re: Replacing core ImageMagick with remi ImageMagick7 trouble

Success! The PECL module imagick recompiled successfully against remi repository ImageMagick6, ImageMagick6-libs and Imagemagick6-devel.  So in brief, what I had to do to get lcms installed on cPanel with ImageMagick PHP bindings:

# yum remove ImageMagick
# yum --enablerepo=remi install ImageMagick6-devel
-- Go to WHM control panel as described here https://documentation.cpanel.net/displa … s/PHP+PECL and click 'reinstall' for the imagick PECL.
-- restart httpd with:
# /scripts/restartsrv_apache_php_fpm
# /scripts/restartsrv_httpd

After this, lcms is listed in the delegates for the command line tool:

# convert -list configure | grep DELEGATES
DELEGATES      bzlib djvu mpeg fftw fontconfig freetype gslib jbig jng jpeg lcms lzma openexr openjp2 pango png ps raqm raw rsvg tiff webp wmf x xml zlib

And, PHP calls like "$img->profileImage('icc', $icc_contents)" succeed.

So, I did not have to enable the remi-php56 repo or use the php-pecl-imagick package, cPanel has its own build process for the PECL module from source using whatever libraries are currently installed on the server.

Thank you for your patience Remi smile

Re: Replacing core ImageMagick with remi ImageMagick7 trouble

smile

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 30 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test