Magento" singleton / core / resource"已存在错误

时间:2012-08-25 07:19:23

标签: magento runtime-error

Mage registry key "_singleton/core/resource" already exists

Trace:
#0 /.../app/Mage.php(222): Mage::throwException('Mage registry k...')
#1 /.../app/Mage.php(476): Mage::register('_singleton/core...', Object(Mage_Core_Model_Resource))
#2 /.../app/code/core/Mage/Core/Model/Resource/Setup.php(141): Mage::getSingleton('core/resource')
#3 /.../app/code/core/Mage/Core/Model/Resource/Setup.php(234): Mage_Core_Model_Resource_Setup->__construct('core_setup')
#4 /.../app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /.../app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#6 /.../app/Mage.php(683): Mage_Core_Model_App->run(Array)
#7 /.../index.php(104): Mage::run('', 'store')
#8 {main}

嗨,我犯了以上错误,从几个博客和社区论坛我开始知道问题在于缓存。所以我在index.php中添加了这个

$app = Mage::app();
if ($app != null)
{
    $cache = $app->getCache();
    if ($cache != null)
    {
        $cache->clean();
    }
}

原始来源:http://vipinsahu.com/magento-mage-registry-key-_singletoncoreresource-already-exists#ixzz24XXCt6m2

但我仍然是一样的。请给我你的想法来解决这个问题。 感谢。

1 个答案:

答案 0 :(得分:0)

尝试在

上刷新magento缓存
  

admin> “系统”>缓存管理

单击按钮刷新magento缓存并删除../ var / cache /

上的所有文件夹