Module 'mysqli' already loaded

Hello, today I tried to login to my web is in hosting server not on localhost but I get this message

PHP Core Warning – yii\base\ErrorException

Module 'mysqli' already loaded
2. yii\base\ErrorHandler::handleFatalError()
$_COOKIE = [
    '_csrf-frontend' => '1eeb7f614f48a8cd57c96d2d21c90a7a465fbc93f9b618433a36ef30c3ddc109a:2:{i:0;s:14:"_csrf-frontend";i:1;s:32:"oe-XYnP-spWkfAnAr60krL0ZcbasV903";}',
    'advanced-frontend' => '204297706ba2ce08d26572dc47df00ea',
    '_identity-frontend' => '428bd26204dadccf0bf60576cce5d967f7e28a7f7737adbfea493f47b38ab2fca:2:{i:0;s:18:"_identity-frontend";i:1;s:49:"[1049,"E0Wg4yb1hO6PcuEQovAQRFVoPylkj_59",2592000]";}',
];

$_SESSION = [
    '__flash' => [],
    '__id' => 1049,
];

I don’t know why i’m getting this error my web works well before it’s just start today
I didn’t change anything in my web
my php.ini is

allow_url_fopen = On
allow_url_include = On
display_errors = Off
enable_dl = Off
file_uploads = On
max_execution_time = 120
max_input_time = 240
max_input_vars = 1000
memory_limit = 256M
post_max_size = 50M
session.gc_maxlifetime = 1440
session.save_path = "/var/cpanel/php/sessions/ea-php72"
upload_max_filesize = 50M
zlib.output_compression = Off

If anyone can help please

Hello

It seems that your hosting service is loading the MySQL I extension twice. This may happen by mistake.

You should contact the support team of your hosting provided with this error.

Thank you very much
I did contact them but I get an answer said that I have to see my phpinfo

Check header of phpinfo() output – see what config files were loaded – it could be more than one.

My phpinfo is in https://groopak.com/info.php

Check /opt/cpanel/ea-php72/root/etc/php.ini for occurrences of mysqli.
Also check for it in /opt/cpanel/ea-php72/root/etc/php.d

You should have only one line reading ‘extension=mysqli.so’

I did look everywhere but I didn’t see this 2 files
on my ssh access
I get this

[groopakc@server5 ~]$ php --ini
Configuration File (php.ini) Path: /opt/cpanel/ea-php56/root/etc
Loaded Configuration File:         /opt/cpanel/ea-php56/root/etc/php.ini
Scan for additional .ini files in: /opt/cpanel/ea-php56/root/etc/php.d
Additional .ini files parsed:      /opt/cpanel/ea-php56/root/etc/php.d/01-ioncube.ini,
/opt/cpanel/ea-php56/root/etc/php.d/bcmath.ini,
/opt/cpanel/ea-php56/root/etc/php.d/bz2.ini,
/opt/cpanel/ea-php56/root/etc/php.d/ctype.ini,
/opt/cpanel/ea-php56/root/etc/php.d/curl.ini,
/opt/cpanel/ea-php56/root/etc/php.d/dba.ini,
/opt/cpanel/ea-php56/root/etc/php.d/dom.ini,
/opt/cpanel/ea-php56/root/etc/php.d/enchant.ini,
/opt/cpanel/ea-php56/root/etc/php.d/exif.ini,
/opt/cpanel/ea-php56/root/etc/php.d/fileinfo.ini,
/opt/cpanel/ea-php56/root/etc/php.d/ftp.ini,
/opt/cpanel/ea-php56/root/etc/php.d/gd.ini,
/opt/cpanel/ea-php56/root/etc/php.d/gettext.ini,
/opt/cpanel/ea-php56/root/etc/php.d/iconv.ini,
/opt/cpanel/ea-php56/root/etc/php.d/imap.ini,
/opt/cpanel/ea-php56/root/etc/php.d/intl.ini,
/opt/cpanel/ea-php56/root/etc/php.d/json.ini,
/opt/cpanel/ea-php56/root/etc/php.d/ldap.ini,
/opt/cpanel/ea-php56/root/etc/php.d/mbstring.ini,
/opt/cpanel/ea-php56/root/etc/php.d/mcrypt.ini,
/opt/cpanel/ea-php56/root/etc/php.d/mysqlnd.ini,
/opt/cpanel/ea-php56/root/etc/php.d/mysqlnd_mysql.ini,
/opt/cpanel/ea-php56/root/etc/php.d/mysqlnd_mysqli.ini,
/opt/cpanel/ea-php56/root/etc/php.d/odbc.ini,
/opt/cpanel/ea-php56/root/etc/php.d/pdo.ini,
/opt/cpanel/ea-php56/root/etc/php.d/pdo_mysqlnd.ini,
/opt/cpanel/ea-php56/root/etc/php.d/pdo_odbc.ini,
/opt/cpanel/ea-php56/root/etc/php.d/pdo_pgsql.ini,
/opt/cpanel/ea-php56/root/etc/php.d/pdo_sqlite.ini,
/opt/cpanel/ea-php56/root/etc/php.d/pgsql.ini,
/opt/cpanel/ea-php56/root/etc/php.d/phar.ini,
/opt/cpanel/ea-php56/root/etc/php.d/posix.ini,
/opt/cpanel/ea-php56/root/etc/php.d/pspell.ini,
/opt/cpanel/ea-php56/root/etc/php.d/shmop.ini,
/opt/cpanel/ea-php56/root/etc/php.d/simplexml.ini,
/opt/cpanel/ea-php56/root/etc/php.d/snmp.ini,
/opt/cpanel/ea-php56/root/etc/php.d/soap.ini,
/opt/cpanel/ea-php56/root/etc/php.d/sockets.ini,
/opt/cpanel/ea-php56/root/etc/php.d/sourceguardian.ini,
/opt/cpanel/ea-php56/root/etc/php.d/sqlite3.ini,
/opt/cpanel/ea-php56/root/etc/php.d/sysvmsg.ini,
/opt/cpanel/ea-php56/root/etc/php.d/sysvsem.ini,
/opt/cpanel/ea-php56/root/etc/php.d/sysvshm.ini,
/opt/cpanel/ea-php56/root/etc/php.d/tokenizer.ini,
/opt/cpanel/ea-php56/root/etc/php.d/xml.ini,
/opt/cpanel/ea-php56/root/etc/php.d/xml_wddx.ini,
/opt/cpanel/ea-php56/root/etc/php.d/xmlreader.ini,
/opt/cpanel/ea-php56/root/etc/php.d/xmlrpc.ini,
/opt/cpanel/ea-php56/root/etc/php.d/xmlwriter.ini,
/opt/cpanel/ea-php56/root/etc/php.d/xsl.ini,
/opt/cpanel/ea-php56/root/etc/php.d/zendguard.ini,
/opt/cpanel/ea-php56/root/etc/php.d/zip.ini,
/opt/cpanel/ea-php56/root/etc/php.d/zzzzzzz-pecl.ini

[groopakc@server5 ~]$

here is all the files I have

I did upload the web on my localhost but I see that if I try to open my web page is try to download the file instead of open my web on browser

This is my PHP Version configuration

Weird thing: the path is for a PHP 5.6 installation, but all your other messages indicate PHP 7.2.

Can you do a grep -rni mysql /opt/cpanel/ea-php* and give me the result?

Result I get is to much lines so I add a txt file in this link is all the result I get

https://groopak.com/ttxxtt/ptts.txt

Yup, the search was too broad, but you’ve found what I was looking for:

/opt/cpanel/ea-php72/root/etc/php.d/zzzzzzz-pecl.ini:1:extension=mysqli.so
...
/opt/cpanel/ea-php72/root/etc/php.d/30-mysqli.ini:2:extension=mysqli.so

Edit zzzzzzz-pecl.ini and remove the line reading extension=mysqli.so, save the file and restart Apache.

You may want to delete the file all together if it only contains that line. Renaming it to zzzzzz doesn’t prevent it from being picked up and causing the duplication when loading modules

OK I will contact the web hosting that they have to remove this line
/opt/cpanel/ea-php72/root/etc/php.d/zzzzzzz-pecl.ini:1:extension=mysqli.so
and I will give you a reply

Or if you feel brave enough:

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

Once vi is open, hit this combination:
dd:wq

1 Like

I did change the web server hosting and now everything is working
Thank you so much for your answer

1 Like