PHP modules already loaded
I've been struggling with the generation of the following PHP error logs in all of my directories where I use php-based webpages.
phpinfo() returns this (and I believe this is relevant to solving the issue):
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.
[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 |
-
Can you clarify, are you looking to remove the error log or resolve the errors within? 0 -
I would like to resolve the errors within. 0 -
Technically they are not errors, they are warnings, so AFAIK the only trouble they are causing is those lines in the error log. 0 -
I would still prefer to resolve the fact that modules are loaded separately while they seem to be included already, without disabling the error log. 0 -
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: 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:; 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)0 -
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 0
Please sign in to leave a comment.
Comments
6 comments