本文介绍了ModX Evo:document.parser.class.inc.php中的PHP错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我的Evo网站停止工作的另一天 - 刚刚得到一个500错误。我让我的主机检查日志,并发现这:

So my Evo site stopped working the other day - just got a 500 error. I got my host to check the logs and found this:

[error] PHP Fatal error:  Cannot redeclare insert_metka() (previously declared in 
/home/mysite/public_html/manager/includes/document.parser.class.inc.php(790) : eval()'d code:2) 
in /home/mysite/public_html/manager/includes/document.parser.class.inc.php(790) : eval()'d code on line 12

我厌倦了注释掉冒犯行,并删除整个文件无效。

I have tired commenting out the offending line and removing the entire file to no avail. Does anyone know what this means and how to fix it?

编辑:第790行的代码:

the code at line 790:

  eval ($pluginCode);


推荐答案

看起来像一个坏的插件破坏了您的网站。停用所有的插件,并一次恢复一个插件,直到它再次中断,然后你知道是哪个是罪魁祸首。

Looks like a bad plugin has broken your site. Disable all your plugins and reinstate them one at a time until it breaks again, then you know which one is the culprit.

一旦你这样做,代码在这里,我们可以帮助你进一步调试。您不应该需要修改MODX源代码。

Once you've done that, post the plugin code here and we can help you debug it further. You shouldn't ever need to modify the MODX source code.

问题可能是通过包装 insert_metka()声明如下:

The problem is likely to be solved by wrapping the insert_metka() declaration like this:

if(!function_exists('insert_metka')) {
    function insert_metka() {
        // function code
    }
}

A HREF =http://wiki.modxcms.com/index.php/Creating_Snippets#Wrap_functions_inside_.21function_exists_conditional_if_the_resource_is_needed_to_run_more_than_once_on_a_page相对=nofollow> http://wiki.modxcms.com/index.php/Creating_Snippets#Wrap_functions_inside_.21function_exists_conditional_if_the_resource_is_needed_to_run_more_than_once_on_a_page

http://wiki.modxcms.com/index.php/Creating_Snippets#Wrap_functions_inside_.21function_exists_conditional_if_the_resource_is_needed_to_run_more_than_once_on_a_page

这篇关于ModX Evo:document.parser.class.inc.php中的PHP错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 12:13