Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
326 views
Welcome To Ask or Share your Answers For Others

1 Answer

When you install php5-memcache it adds it's own memcache.ini file which is set to load that extension already. So Just remove/comment the loading of the extension from your php.ini.

 ;extension=memcache.so

Similar with APC (Alternative PHP Cache Module).

 ;extension=apc.so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...