2014-04-16 86 views
0

我剛剛在LAMP環境中安裝了Magento 1.8.1。當我第一次嘗試登錄到管理區域時,我收到了一條錯誤消息。這是我的錯誤發現VAR /報告:無法登錄到Magento 1.8.1 admin

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,然後清除瀏覽器緩存。做完所有這些後,問題仍然存在。請幫忙。

回答

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() 
); 
+0

這似乎有點破解。想想我現在會堅持另一個答案 – amburnside