jdn1976

Member
Sep 21, 2020
8
0
1
Brazil
cPanel Access Level
Root Administrator
Hello I have installed the imagick from a tutorial that I found on google:


I follow those steps.

Somehow when I access for example on whmcs sometimes gives this message:

Oops!
Something went wrong and we couldn't process your request.
Please go back to the previous page and try again.

Whoops\Exception\ErrorException: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /opt/cpanel/ea-php73/root/usr/lib64/php/modules/imagick.so (/opt/cpanel/ea-php73/root/usr/lib64/php/modules/imagick.so: cannot open shared object file: No such file or directory), /opt/cpanel/ea-php73/root/usr/lib64/php/modules/imagick.so.so (/opt/cpanel/ea-php73/root/usr/lib64/php/modules/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown:0
Stack trace:
#0 /home/user/public_html/cliente/vendor/whmcs/whmcs-foundation/lib/Utility/Error/Run.php(0): WHMCS\Utility\Error\Run->handleError(32, 'PHP Startup: Un...', 'Unknown', 0)
#1 [internal function]: WHMCS\Utility\Error\Run->handleShutdown()
#2 {main}

This happens after I installed the imagick.

I try to remove imagick:

yum -y remove ImageMagick-devel ImageMagick-c++-devel ImageMagick-perl

and restart the httpd. And the issue remains. I checked:

[[email protected] etc]# /usr/bin/convert --version


Version: ImageMagick 6.9.10-68 Q16 x86_64 2020-04-01 ImageMagick
Copyright: © 1999-2019 ImageMagick Studio LLC
License: ImageMagick
Features: Cipher DPC Modules OpenMP(3.1)
Delegates (built-in): bzlib cairo fontconfig freetype gslib jng jpeg lcms ltdl lzma openexr pangocairo png ps rsvg tiff wmf x xml zlib
[[email protected] etc]#

(seems to be still installed even I remove using yum)

and here:

[[email protected] modules]# pwd
/opt/cpanel/ea-php73/root/usr/lib64/php/modules
[[email protected] modules]#

[[email protected] modules]# ls
bcmath.so gettext.so pdo_mysql.so sqlite3.so
bz2.so gmp.so pdo_pgsql.so tidy.so
calendar.so iconv.so pdo.so tokenizer.so
ctype.so imap.so pdo_sqlite.so wddx.so
curl.so intl.so pgsql.so xmlreader.so
dba.so ioncube_loader_lin_7.3.so phar.so xmlrpc.so
dom.so json.so posix.so xml.so
enchant.so ldap.so pspell.so xmlwriter.so
exif.so mbstring.so simplexml.so xsl.so
fileinfo.so mysqli.so snmp.so zip.so
ftp.so mysqlnd.so soap.so
gd.so opcache.so sockets.so
[[email protected] modules]

I already checked the WHM > MultiPHP INI Editor > Editor Mode
and try to find "imagick" but did not find anything.

What I am missing?
 

andrew.n

Well-Known Member
Jun 9, 2020
607
171
43
EU
cPanel Access Level
Root Administrator
Go to WHM then Module Installers then PECL and there type "imagick" then click on install. Do it for all of the PHP versions you want and this way it will work fine :)
 

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
619
200
343
cPanel Access Level
DataCenter Provider
Depending on your install you may also need:

Code:
yum install ImageMagick-devel
You'll know because the PECL install will fail (if it needs the devel libraries).
 

jdn1976

Member
Sep 21, 2020
8
0
1
Brazil
cPanel Access Level
Root Administrator
Go to WHM then Module Installers then PECL and there type "imagick" then click on install. Do it for all of the PHP versions you want and this way it will work fine :)
I try to install using WHM > Modules Installers > PECL and imagick but did not solve the issue.
It shows the same error on WHMCS. This is odd, because it only happens on WHMCS script. Wordpress, etc, seems to be fine.

Any ideas?
 

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
619
200
343
cPanel Access Level
DataCenter Provider
Are you running 'vanilla' cPanel/WHM/CentOS or are you running CloudLinux and/or LiteSpeed Web server? I have you check the phpinfo (Utilities, System, PHPInfo) to see if says anything about imagick?
 

jdn1976

Member
Sep 21, 2020
8
0
1
Brazil
cPanel Access Level
Root Administrator
Are you running 'vanilla' cPanel/WHM/CentOS or are you running CloudLinux and/or LiteSpeed Web server? I have you check the phpinfo (Utilities, System, PHPInfo) to see if says anything about imagick?
Are you running 'vanilla' cPanel/WHM/CentOS or are you running CloudLinux and/or LiteSpeed Web server?
A: No. It is a CentOS 7. No vanilla or LiteSpeed or CloudLinux. It is Apache web server.

I have you check the phpinfo (Utilities, System, PHPInfo) to see if says anything about imagick?
A: Yes I see:

php72/root/etc/php.d/imagick.ini, /opt/cpanel/ea-php72/root/etc/php.d/zzzzzzz-pecl.ini

imagick
imagick moduleenabled
imagick module version 3.4.4
imagick classes Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
Imagick compiled with ImageMagick version ImageMagick 6.9.10-68 Q16 x86_64 2020-04-01 ImageMagick
Imagick using ImageMagick library version ImageMagick 6.9.10-68 Q16 x86_64 2020-04-01 ImageMagick
ImageMagick copyright © 1999-2019 ImageMagick Studio LLC
ImageMagick release date 2020-04-01
ImageMagick number of supported formats: 230