我刚刚在LAMP环境中安装了Magento 1.8.1。在我第一次尝试登录管理区域时收到错误消息。这是我在var / report中的错误中找到的:
a:5:{i:0;s:24:"Currency 'GBP' not found";i:1;s:3536:"#0 /home/dlsb/public_html/app/code/core/Mage/Core/Model/Locale.php(587): Zend_Currency->__construct('GBP')
#1 /home/dlsb/public_html/app/code/core/Mage/Directory/Model/Currency.php(270): Mage_Core_Model_Locale->currency('GBP')
#2 /home/dlsb/public_html/app/code/core/Mage/Directory/Model/Currency.php(242): Mage_Directory_Model_Currency->formatTxt(NULL, Array)
#3 /home/dlsb/public_html/app/code/core/Mage/Directory/Model/Currency.php(222): Mage_Directory_Model_Currency->formatPrecision(NULL, 2, Array, true, false)
#4 /home/dlsb/public_html/app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php(82): Mage_Directory_Model_Currency->format(NULL)
#5 /home/dlsb/public_html/app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php(62): Mage_Adminhtml_Block_Dashboard_Bar->format(NULL)
#6 /home/dlsb/public_html/app/code/core/Mage/Adminhtml/Block/Dashboard/Totals.php(74): Mage_Adminhtml_Block_Dashboard_Bar->addTotal('Revenue', NULL)
#7 /home/dlsb/public_html/app/code/core/Mage/Core/Block/Abstract.php(293): Mage_Adminhtml_Block_Dashboard_Totals->_prepareLayout()
#8 /home/dlsb/public_html/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#9 /home/dlsb/public_html/app/code/core/Mage/Adminhtml/Block/Dashboard.php(50): Mage_Core_Model_Layout->createBlock('adminhtml/dashb...')
#10 /home/dlsb/public_html/app/code/core/Mage/Core/Block/Abstract.php(293): Mage_Adminhtml_Block_Dashboard->_prepareLayout()
#11 /home/dlsb/public_html/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#12 /home/dlsb/public_html/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('adminhtml/dashb...', 'dashboard')
#13 /home/dlsb/public_html/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('adminhtml/dashb...', 'dashboard')
#14 /home/dlsb/public_html/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#15 /home/dlsb/public_html/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#16 /home/dlsb/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#17 /home/dlsb/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#18 /home/dlsb/public_html/app/code/core/Mage/Adminhtml/Controller/Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)
#19 /home/dlsb/public_html/app/code/core/Mage/Adminhtml/controllers/DashboardController.php(40): Mage_Adminhtml_Controller_Action->loadLayout()
#20 /home/dlsb/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_DashboardController->indexAction()
#21 /home/dlsb/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#22 /home/dlsb/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#23 /home/dlsb/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#24 /home/dlsb/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#25 /home/dlsb/public_html/index.php(87): Mage::run('', 'store')
#26 {main}";s:3:"url";s:70:"/index.php/admin/dashboard/index/key/6dafbe1266347635735b10354e511cc5/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}
在谷歌搜索之后,我读了一些帖子,建议删除以下数据:
var/cache
var/session
var/locks
var/report
然后重新启动apache然后清除浏览器缓存。完成所有这些后,问题仍然存在。请帮忙。
答案 0 :(得分:1)
打开此文件>应用程序/代码/核心/法师/核心/型号/会话/摘要/ Varien.php 转到第88行[在我的应用程序中]
$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath()
'domain' => $cookie->getConfigDomain(),
'secure' => $cookie->isSecure(),
'httponly' => $cookie->getHttponly()
);
注释如下所示的行
$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath()
//'domain' => $cookie->getConfigDomain(),
//'secure' => $cookie->isSecure(),
//'httponly' => $cookie->getHttponly()
);