PHP Remove/Fix Module Not Found or Already Loaded Warnings

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.

  1. check the php.ini, that not have set xdebug.so for the values extension= and zend_extension=.

  2. Check also /etc/php5/apache2 and /etc/php5/cli/. You should not load in each php.ini in these directories the extension xdebug.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, like php7.

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



Leave a reply



Submit