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
if you dont whants to update in config file, just add on top of your page or constructor "error_reporting(0)"
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.
Similar with APC (Alternative PHP Cache Module).
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/.
In my case the result was:
To get rid of the warning message I removed the line
extension=memcache.so
from the memcache.ini file.If you are using php5.4 (CentOS 6.5),
/etc/php.d/
in
memcache.ini
comment the extensionlikewise in
apc.ini
I came here looking for a solution to a similar error i.e.
Warning: Module 'pdo_pgsql' already loaded in Unknown on line 0
. After looking at various sites, here's the solution I came up with. It worked for me, hope it does for someone with a similar issue.conf.d
, mine was in the directory/usr/local/etc/php/7.0/conf.d
.ext-pdo_pgsql.ini
.sudo nano ext-pdo_pgsql.ini
to edit it.extension="/usr/local/opt/php70-pdo-pgsql/pdo_pgsql.so"
. Comment it out by adding semi-colon to the beginning of the line i.e.;extension="/usr/local/opt/php70-pdo-pgsql/pdo_pgsql.so"
.there are configuration files modules /etc/php5/mods-available
Open file pdo_mysql.ini and comment line pdo_mysql.so
After service apache2 | php5-fpm restart depending on whether you are using you