PHP删除/修复模块未找到或已加载警告? [英] PHP remove/fix module not found or already loaded warnings?

查看:91
本文介绍了PHP删除/修复模块未找到或已加载警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我从如下所示的命令行运行php脚本时

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

php test.php

我得到以下输出

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 

的输出

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 ...

请帮助

推荐答案

在安装php5-memcache时,它会添加它自己的memcache.ini文件,该文件已设置为已加载该扩展名.因此,只需从php.ini中删除/注释扩展的加载即可.

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

类似于APC(备用PHP缓存模块).

Similar with APC (Alternative PHP Cache Module).

 ;extension=apc.so

这篇关于PHP删除/修复模块未找到或已加载警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆