php -m | grep imagick imagick = true, but in PHPINFO() = false

000

Well-Known Member
Jun 3, 2008
549
30
78
Hello.

all is ok when I run
Code:
[root@pepsi ~]# php -m | grep imagick
imagick
but in page PHP
PHP:
<?php
phpinfo();
return false (not exist imagick).

Please help; this machine is:
Code:
[root@pepsi ~]# grep CPANEL /etc/cpupdate.conf
CPANEL=release
[root@pepsi ~]#  cat /usr/local/cpanel/version
11.84.0.9
[root@pepsi ~]# cat /etc/redhat-release;
CentOS Linux release 7.7.1908 (Core)
[root@pepsi ~]#
 

000

Well-Known Member
Jun 3, 2008
549
30
78
Code:
[root@pepsi ~]# locate imagick.so
/opt/cpanel/ea-php71/root/usr/lib64/php/modules/imagick.so
/opt/cpanel/ea-php72/root/usr/lib64/php/modules/imagick.so
/opt/cpanel/ea-php73/root/usr/lib64/php/modules/imagick.so
[root@pepsi ~]#
but PHPINFO() continue empty about ImaGick
 

000

Well-Known Member
Jun 3, 2008
549
30
78
Code:
[root@pepsi ~]# convert -version
Version: ImageMagick 6.7.8-9 2019-08-08 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP

[root@pepsi ~]#
but PHPINFO() continue empty about iMagick
 

000

Well-Known Member
Jun 3, 2008
549
30
78
oh my god!...

I lost more of 4 hours in this ...

I restart APACHE many times, and run many commands...

finally I suspect: "and if is OTHER BUG of cPanel as with BrowScap which requires restart the server and not just apache"...

and YES!, other BUG of cPanel!

only fixed when you restart ALL SERVER and not oly Apache
(identic in the case of BrowScap)

Subject finished ! :) thanks
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston
I've never heard of anyone having to restart the server in order to get imagick to function. This sounds like something else occurred to cause it not to function. I am glad to see that you were able to get it working, though I do feel it would warrant some further investigation.
 

000

Well-Known Member
Jun 3, 2008
549
30
78
I've never heard of anyone having to restart the server in order to get imagick to function. This sounds like something else occurred to cause it not to function. I am glad to see that you were able to get it working, though I do feel it would warrant some further investigation.
Thanks Lauren.

The best would be what you say, but unfortunately when you touch
Code:
/opt/cpanel/ea-php{X}/root/etc/php.ini
this changes only load when you restart ALL SERVER, no´t just Apache.

This problem exist from many time back, as by example when you setup BrowScap
Code:
[browscap]
; http://php.net/browscap
browscap = /home/full_php_browscap-2019-11.ini
this sample change never is loaded by Apache until when you restart the machine...

Years ago it was different: only restart Apache and all fine.

Now, we need restart the server complet for any change in PHP.ini

:-s
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston
Extensions should never be placed directly into the global php.ini file. They're added with an include, if you're making modifications to this manually it will cause issues.
 

linux4me2

Well-Known Member
Aug 21, 2015
259
80
78
USA
cPanel Access Level
Root Administrator
@000 Are you using PHP-FPM by chance? It seems like I had to restart PHP-FPM after installing Imagick for the version of PHP I was using to get Imagick working. If you are using PHP-FPM, that might explain why rebooting the server fixed it; it would have restarted PHP-FPM.
 

000

Well-Known Member
Jun 3, 2008
549
30
78
that is other BUG in cPanel,
for load/refresh the current config,
is necessary restart the server/VPS.

:-|
 

masterross

Well-Known Member
Apr 7, 2004
73
5
158
@000 Are you using PHP-FPM by chance? It seems like I had to restart PHP-FPM after installing Imagick for the version of PHP I was using to get Imagick working. If you are using PHP-FPM, that might explain why rebooting the server fixed it; it would have restarted PHP-FPM.
Damn, you are right!
i also lost a few hours to find why imagick not loading!
I thought when Apache is restarted it also restarts PHP-FPM too! But obviously not!