【发布时间】:2012-11-14 03:21:13
【问题描述】:
一个致命错误出现在所有网页中:
致命错误:在中找不到类“Mage_Http:_Helper” /web/htdocs/www.dolcefuoco.com/home/app/Mage.php 在第 521 行
错误与下面的函数有关:
public static function helper($name)
{
if (strpos($name, '/') === false) {
$name .= '/data';
}
$registryKey = '_helper/' . $name;
if (!self::registry($registryKey)) {
$helperClass = self::getConfig()->getHelperClassName($name);
self::register($registryKey, new $helperClass);
}
return self::registry($registryKey);
}
第 521 行在哪里:
self::register($registryKey, new $helperClass);
日志警告下方:
2012-11-26T22:27:10+00:00 ERR (3): Warning: include(Mage/Http:/Helper.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in /web/htdocs/www.dolcefuoco.com/home/lib/Varien/Autoload.php on line 93
2012-11-26T22:27:10+00:00 ERR (3): Warning: include() [<a href='function.include'>function.include</a>]: Failed opening 'Mage/Http:/Helper.php' for inclusion (include_path='/web/htdocs/www.dolcefuoco.com/home/app/code/local:/web/htdocs/www.dolcefuoco.com/home/app/code/community:/web/htdocs/www.dolcefuoco.com/home/app/code/core:/web/htdocs/www.dolcefuoco.com/home/lib:.:/php5/lib/php/') in /web/htdocs/www.dolcefuoco.com/home/lib/Varien/Autoload.php on line 93
这里的 autoload.php 函数会产生问题:
* Register SPL autoload function
*/
static public function register()
{
spl_autoload_register(array(self::instance(), 'autoload'));
}
/**
* Load class source code
*
* @param string $class
*/
public function autoload($class)
{
if ($this->_collectClasses) {
$this->_arrLoadedClasses[self::$_scope][] = $class;
}
if ($this->_isIncludePathDefined) {
$classFile = $class;
} else {
$classFile = str_replace(' ', DIRECTORY_SEPARATOR, ucwords(str_replace('_', ' ', $class)));
}
$classFile.= '.php';
//echo $classFile;die();
return include $classFile;
}
第 93 行是:
return include $classFile;
我能做些什么来解决它?任何建议都非常感谢,该网站已关闭!
【问题讨论】:
-
你做了哪些改变?
-
我禁用了 Tag 模块,并且错误地禁用了 Mage_Admin。我发现我只有在单击保存按钮后才禁用 Mage_admin。一旦完成,网站就崩溃了。然后我再次启用它。但是什么也没发生。我不知道这个 Mage_admin 是否有影响,但每次都发生在我进行此编辑之后。
-
还有其他事情发生。禁用
Mage_Admin不会关闭该站点。而且,根据您的版本,Mage_Admin甚至不会禁用您的管理员。我认为还有一些巧合的事情正在发生。有可能是另一个模块导致了问题。Mage_Http:_Helper是对Mage_Core_Helper_Http的错误引用。你最近有安装什么吗? -
没有,该网站运行良好。在过去的几天里,我没有安装任何东西。我对页脚进行了一些更改,但在编辑后我进行了一些测试,并且该站点可以正常运行。我刚刚在 phpmyadmin 上注意到数据库超出了我们支付的最大大小。我只是要求升级数据库大小。这个错误可能与数据库或类似的东西有关吗?
-
不可能通过管理员禁用模块 - 只能禁用模块 输出(如组名所示)。不知道这要说多少次,但希望人们会注意。