Installing Imagick only installs on lowest php version

mvandemar

Well-Known Member
Jun 17, 2006
171
47
178
I installed Imagick on a client's server by going to Software -> Module Installers -> PHP Pecl, searching for it, and installing it. It said it worked fine. I restarted both php-fpm and apache, wrote a test script, and the script failed. I ssh'd into the server, cd to /opt/cpanel/ea-php73, and grepped for imagick, and nothing came up. I then went up a few levels to /opt/cpanel and re-ran the grep, and a bunch of stuff came up, but only in the /opt/cpanel/ea-php72 branch.

How do I get it to install for all installed versions of php and not just the lowest one? I did confirm that if I set the site to use 7.2 instead of 7.3 imagick does work, but I don't understand why the interface only did it for the one version.

Edit: correction, on another server for the client it didn't just install on the lowest one, it installed on 5.6, 7.0, and 7.1, but not on 7.2, 7.3, or 7.4:


Code:
[[email protected] ~]# cd /opt/cpanel/ea-php73/root/etc/php.d
[[email protected] php.d]# grep -Ir imagick *
[[email protected] php.d]# cd /opt/cpanel/ea-php72/root/etc/php.d
[[email protected] php.d]# grep -Ir imagick *
[[email protected] cpanel]# cd /opt/cpanel/ea-php56/root/etc/php.d
[[email protected] php.d]# grep -Ir imagick *
zzzzzzz-pecl.ini:extension="imagick.so"
[[email protected] php.d]# cd /opt/cpanel/ea-php70/root/etc/php.d
[[email protected] php.d]# grep -Ir imagick *
zzzzzzz-pecl.ini:extension="imagick.so"
[[email protected] php.d]# cd /opt/cpanel/ea-php71/root/etc/php.d
[[email protected] php.d]# grep -Ir imagick *
zzzzzzz-pecl.ini:extension="imagick.so"
[[email protected] php.d]# cd /opt/cpanel/ea-php72/root/etc/php.d
[[email protected] php.d]# grep -Ir imagick *
[[email protected] php.d]# cd /opt/cpanel/ea-php74/root/etc/php.d

-Michael
 
Last edited:

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
You need to install it for each version of PHP on the server.


When installed correctly you should see the following output in the module installer UI - the example I'm providing is from PHP 7.1

Code:
Build process completed successfully
Installing '/opt/cpanel/ea-php71/root/usr/lib64/php/modules/imagick.so'
Installing '/opt/cpanel/ea-php71/root/usr/include/php/ext/imagick/php_imagick_shared.h'
install ok: channel://pecl.php.net/imagick-3.4.4
Extension imagick enabled in php.ini
I tested this on my own server and found no issues with it being shown:
Code:
[[email protected] ~]# grep -ir imagick /opt/cpanel/ea-php**/root/etc/php.d
/opt/cpanel/ea-php56/root/etc/php.d/zzzzzzz-pecl.ini:extension="imagick.so"
/opt/cpanel/ea-php71/root/etc/php.d/zzzzzzz-pecl.ini:extension="imagick.so"
/opt/cpanel/ea-php72/root/etc/php.d/zzzzzzz-pecl.ini:extension="imagick.so"
/opt/cpanel/ea-php73/root/etc/php.d/zzzzzzz-pecl.ini:extension="imagick.so"
/opt/cpanel/ea-php74/root/etc/php.d/zzzzzzz-pecl.ini:extension="imagick.so"
 
  • Like
Reactions: mvandemar