简体   繁体   English

PHP 警告:模块 'json' 已加载

[英]PHP Warning: Module 'json' already loaded

While executing my PHP code in editor (Eclipse), I am getting this error:在编辑器(Eclipse)中执行我的 PHP 代码时,我收到此错误:

PHP Warning: Module 'json' already loaded in Unknown on line 0. PHP 警告:模块 'json' 已加载到第 0 行的未知中。

What's the problem here, and how do I fix it?这里有什么问题,我该如何解决?

What version of PHP are you running?你运行的是什么版本的PHP? Have you recently upgraded from an older version?您最近是否从旧版本升级?

The JSON module only became a standard part of PHP in v5.2; JSON 模块仅在 v5.2 中成为 PHP 的标准部分; prior to that you would have had to added the PECL JSON module into it yourself.在此之前,您必须自己将 PECL JSON 模块添加到其中。

If you've upgraded to 5.2 or 5.3, but you've still got an old config which is trying to add the PECL JSON module, then it will conflict with the JSON module that is now built into PHP.如果您已升级到 5.2 或 5.3,但您仍然有一个尝试添加 PECL JSON 模块的旧配置,那么它将与现在内置于 PHP 中的 JSON 模块冲突。

Try to find where you're including the PECL module and remove it.尝试找到包含 PECL 模块的位置并将其删除。 Your JSON functions should continue to work as before.您的 JSON 函数应该像以前一样继续工作。

php.ini中搜索行extension=json.so并删除或更改为;extension=json.so

有时您需要检查文件夹php.d (在我的情况下是 centos)而不是检查文件20-json.ini

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM