PHP remove/fix module not found or already loaded warnings?
I had the same situation. In my case the problem was that I had two configuration files for memcache in /etc/php5/cli/conf.d/.
php -i | grep memcache.ini
In my case the result was:
/etc/php5/cli/conf.d/20-memcache.ini,
/etc/php5/cli/conf.d/memcache.ini
To get rid of the warning message I removed the line extension=memcache.so
from the memcache.ini file.
PHP Warning: Module already loaded in Unknown on line 0
I think you have loaded Xdebug probably twice in php.ini
.
check the
php.ini
, that not have setxdebug.so
for the valuesextension=
andzend_extension=
.Check also
/etc/php5/apache2
and/etc/php5/cli/
. You should not load in eachphp.ini
in these directories the extensionxdebug.so
. Only one file,php.ini
should load it.Note: Inside the path is the string
/etc/php5
. The 5 is the version of PHP. So if you use another version, you always get a different path, likephp7
.
Module 'PDO' already loaded in Unknown on line 0 in laravel installation on ubuntu
Maybe, somewhere in your php.ini you have a duplicated pdo extension inclusion. Open your php.ini and search for extension = "pdo.so" (or simply pdo.so). Remove any duplication found. Restart apache.
Module 'eAccelerator' already loaded php warning
It sounds to me like you've got the configuration in multiple files.
If your set up is on Debian (or something like Debian) it could be that eAccelerator is loaded in php.ini
as well as in a secondary file. For instance, on Debian, php.ini
lives at /etc/php5/apache2/php.ini
(for PHP 5.x and Apache 2.x). But it also parses all the files in /etc/php5/conf.d/
, which in my case includes files like gd.ini
, mysql.ini
, and suhosin.ini
. I have see misconfigured packages add configuration to the end of php.ini
as well as in a separate file in conf.d
. This will give the kind of error you're seeing.
FYI, this scanning is done with a compile-time configure option (specifically, --with-config-file-scan-dir=
).
Related Topics
Zend Framework 2 - Removed Form Element Causes Validation to Fail
PHP File_Get_Contents() Behaves Differently to Browser
How to Avoid Using PHP Global Objects
How to Launch a PHP Script at Apache Startup
Trouble Passing Variables to PHP Script on Image Upload
Tcpdf and Insert an Image Base64 Encoded
PHP - Is There a Portable Version of PHPunit
How to Update an Ini File with PHP
How to Take a Screenshot of a Website with PHP and Gd
How to Send Https Posts Using PHP
Symfony 2 Forms Entity Field Type Grouping
Select Statement with Fetch_Array in MySQLi Prepared Statements
PHP Xpath - Find Element with a Value and Also Get Elements Before and After Element
Get Specific Device Information
How to Start a Windows Gui Program Using PHP