Alanca

Registered
Jun 3, 2019
4
0
1
Belgium
cPanel Access Level
Root Administrator
I've been struggling with the generation of the following PHP error logs in all of my directories where I use php-based webpages.

Code:
[30-Aug-2019 19:33:00 UTC] PHP Warning:  Module 'PDO' already loaded in Unknown on line 0
[30-Aug-2019 19:33:00 UTC] PHP Warning:  Module 'pdo_sqlite' already loaded in Unknown on line 0
[30-Aug-2019 19:33:00 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'sqlite.so' (tried: /opt/cpanel/ea-php72/root/usr/lib64/php/modules/sqlite.so (/opt/cpanel/ea-php72/root/usr/lib64/php/modules/sqlite.so: cannot open shared object file: No such file or directory), /opt/cpanel/ea-php72/root/usr/lib64/php/modules/sqlite.so.so (/opt/cpanel/ea-php72/root/usr/lib64/php/modules/sqlite.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[30-Aug-2019 19:33:00 UTC] PHP Warning:  Module 'pdo_mysql' already loaded in Unknown on line 0

phpinfo() returns this (and I believe this is relevant to solving the issue):

Configuration File (php.ini) Path/opt/cpanel/ea-php72/root/etc
Loaded Configuration File/home/projectname/public_html/php.ini
Scan this dir for additional .ini files/opt/cpanel/ea-php72/root/etc:/opt/cpanel/ea-php72/root/etc/php.d:.
Additional .ini files parsed/opt/cpanel/ea-php72/root/etc/php.ini, /opt/cpanel/ea-php72/root/etc/php.d/10-opcache.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-bcmath.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-bz2.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-calendar.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-ctype.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-curl.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-dba.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-dom.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-enchant.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-exif.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-fileinfo.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-ftp.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-gd.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-gettext.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-gmp.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-iconv.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-imap.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-intl.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-json.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-mbstring.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-mysqlnd.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-odbc.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-pdo.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-pgsql.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-phar.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-posix.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-simplexml.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-soap.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-sockets.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-sqlite3.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-tidy.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-tokenizer.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-xml.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-xmlwriter.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-xsl.ini, /opt/cpanel/ea-php72/root/etc/php.d/20-zip.ini, /opt/cpanel/ea-php72/root/etc/php.d/30-mysqli.ini, /opt/cpanel/ea-php72/root/etc/php.d/30-pdo_mysql.ini, /opt/cpanel/ea-php72/root/etc/php.d/30-pdo_odbc.ini, /opt/cpanel/ea-php72/root/etc/php.d/30-pdo_pgsql.ini, /opt/cpanel/ea-php72/root/etc/php.d/30-pdo_sqlite.ini, /opt/cpanel/ea-php72/root/etc/php.d/30-wddx.ini, /opt/cpanel/ea-php72/root/etc/php.d/30-xmlreader.ini, /opt/cpanel/ea-php72/root/etc/php.d/30-xmlrpc.ini, /opt/cpanel/ea-php72/root/etc/php.d/zzzzzzz-pecl.ini, ./.user.ini, ./php.ini

Whereas most Google searches return the removal or commenting of duplicate lines inserting extentions in a php.ini file, I'm unable to find something similar to the point where I see no other way than to start posting this on relevant forums seeking help.
If I need to provide more information, please let me know.
 

quietFinn

Well-Known Member
Feb 4, 2006
1,784
404
438
Finland
cPanel Access Level
Root Administrator
Technically they are not errors, they are warnings, so AFAIK the only trouble they are causing is those lines in the error log.
 

quietFinn

Well-Known Member
Feb 4, 2006
1,784
404
438
Finland
cPanel Access Level
Root Administrator
I found a website in one of our servers giving pretty much the same warnings.
In that website's public_html folder there was a (about 6 years old) php.ini file with these lines:
Code:
magic_quotes_gpc = Off
extension=pdo.so
extension=pdo_mysql.so
I removed that file and now that site still works ok and does not give any warnings any more.

Of course I don't mean that you should remove just any or every php.ini you find, but if it had been cPanel generated php.in it would include lines:
Code:
; cPanel-generated php ini directives, do not edit
; Manual editing of this file may result in unexpected behavior.
; To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
; For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
 
Last edited:
  • Like
Reactions: cPanelLauren

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,272
1,296
363
Houston
If you're already loading a module in the global PHP.ini for that version of PHP it's unnecessary to load it again in an account-based .ini file - this is what produces that warning. You shoudl be able to just remove the extension= lines