Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP remove/fix module not found or already loaded warnings?

Tags:

When i run a php script from the command line like below

php test.php 

i get following output

PHP Warning:  Module 'memcache' already loaded in Unknown on line 0 PHP Warning:  Module 'apc' already loaded in Unknown on line 0 

how do i fix or remove these module warnings ? I checked the php.ini in

etc/php.ini  

output of

php -i | grep php.ini PHP Warning:  Module 'memcache' already loaded in Unknown on line 0 PHP Warning:  Module 'apc' already loaded in Unknown on line 0 Configuration File (php.ini) Path => /etc Loaded Configuration File => /etc/php.ini 

i dont see any loading or any reference to these two modules in there ...

please help

like image 631
mahen3d Avatar asked Oct 29 '13 09:10

mahen3d


1 Answers

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.

like image 52
cristi2091 Avatar answered Sep 28 '22 04:09

cristi2091