我已经将Magento从1.9.3.7版本升级到了1.9.4.1。升级后,仪表板图表将无法正常工作。
调试后可能会看到503服务不可用错误:
a:5:{i:0;s:28:"Invalid header line detected";i:1;s:1304:"#0 /home/devabellioprojec/public_html/lib/Zend/Http/Response.php(696): Zend_Http_Response::extractHeaders('HTTP/2 200 \r\nda...')
#1 /home/devabellioprojec/public_html/lib/Zend/Http/Client.php(1110): Zend_Http_Response::fromString('HTTP/2 200 \r\nda...')
#2 /home/devabellioprojec/public_html/lib/Varien/Http/Client.php(61): Zend_Http_Client->request('GET')
#3 /home/devabellioprojec/public_html/app/code/core/Mage/Adminhtml/controllers/DashboardController.php(100): Varien_Http_Client->request('GET')
#4 /home/devabellioprojec/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_DashboardController->tunnelAction()
#5 /home/devabellioprojec/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('tunnel')
#6 /home/devabellioprojec/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))
#7 /home/devabellioprojec/public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#8 /home/devabellioprojec/public_html/app/Mage.php(686): Mage_Core_Model_App->run(Array)
#9 /home/devabellioprojec/public_html/index.php(91): Mage::run('', 'store')
#10 {main}";s:3:"url";s:642:"/index.php/admin_abl/dashboard/tunnel/key/704e7120617912e473bfcf2a829bb225/?ga=eyJjaHQiOiJsYyIsImNoZiI6ImJnLHMsZjRmNGY0fGMsbGcsOTAsZmZmZmZmLDAuMSxlZGVkZWQsMCIsImNobSI6IkIsZjRkNGIyLDAsMCwwIiwiY2hjbyI6ImRiNDgxNCIsImNoeHMiOiIwLDAsMTF8MSwwLDExIiwiY2htYSI6IjE1LDE1LDE1LDE1IiwiY2hkIjoiYToyMDYyLjEsMjkzMS4zLDI2ODAzLDIzMjY5Ljk1LDgwOTguODUsMTY4NCwwIiwiY2h4dCI6IngseSIsImNoeGwiOiIwOnwxOFwvMDVcLzIwMTl8MTlcLzA1XC8yMDE5fDIwXC8wNVwvMjAxOXwyMVwvMDVcLzIwMTl8MjJcLzA1XC8yMDE5fDIzXC8wNVwvMjAxOXwyNFwvMDVcLzIwMTl8MTp8MHwxMDAwMHwyMDAwMHwzMDAwMCIsImNocyI6IjU4N3gzMDAiLCJjaGciOiIxNi42NjY2NjY2NjY2NjcsMzMuMzMzMzMzMzMzMzMzLDEsMCJ9&h=1596bf5a67149a9dbedc6b96f1f171d5";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}
答案 0 :(得分:2)
这不是权限问题。因此上述解决方案不起作用。
要解决此问题,您需要更改lib/Zend/Http/Response.php
if ($index === 0 && preg_match('#^HTTP/\d+(?:\.\d+) [1-5]\d+#', $line)) {
// Status line; ignore
continue;
}
到
if ($index === 0 || preg_match('#^HTTP/\d+(?:\.\d+) [1-5]\d+#', $line)) {
// Status line; ignore
continue;
}
function extractVersion($response_str)
在第一行功能中添加行
return "1.1"
;