【问题标题】:Magento Error: Cannot send headers; headers already sent in public_html/lib/Mandrill/Mandrill/Exports.phpMagento 错误:无法发送标头;标头已在 public_html/lib/Mandrill/Mandrill/Exports.php 中发送
【发布时间】:2016-08-07 17:21:00
【问题描述】:

每当有人要求更改密码或完成结帐时,我都会收到此异常页面并显示错误代码。

“处理您的请求时出错 - 出于安全原因,默认情况下禁用异常打印。”

我查看过错误文件,上面写着:

a:5:{i:0;s:114:"
Cannot send headers; headers already sent in /home/siteusername/public_html/lib/Mandrill/Mandrill/Exports.php, line 1
";i:1;s:1796:"
/home/siteusername/public_html/lib/Zend/Controller/Response/Abstract.php(148): Zend_Controller_Response_Abstract->canSendHeaders(true)
/home/siteusername/public_html/app/code/core/Mage/Core/Controller/Response/Http.php(107): Zend_Controller_Response_Abstract->setRedirect('mysite.com', 302)
/home/siteusername/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(711): Mage_Core_Controller_Response_Http->setRedirect('mysite.com')
/home/siteusername/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(689): Mage_Core_Controller_Varien_Action->setRedirectWithCookieCheck('*/*/', Array)
/home/siteusername/public_html/app/code/core/Mage/Customer/controllers/AccountController.php(752): Mage_Core_Controller_Varien_Action->_redirect('*/*/')
/home/siteusername/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Customer_AccountController->forgotPasswordPostAction()
/home/siteusername/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('forgotpasswordp...')
/home/siteusername/public_html/app/code/community/BalkeTechnologies/StoreMaintenance/Controller/Router/Standard.php(91): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
/home/siteusername/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): BalkeTechnologies_StoreMaintenance_Controller_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
/home/siteusername/public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
/home/siteusername/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
/home/siteusername/public_html/index.php(85): Mage::run('', 'store')
{main}
";s:3:"url";s:37:"/customer/account/forgotpasswordpost/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

被困在这个时代,找不到解决办法。

【问题讨论】:

  • 启用打印错误尝试此答案:stackoverflow.com/questions/18480310/…
  • 看看第一行lib/Mandrill/Mandrill/Exports.php脚本,可能<?php之前有空格或换行符,或者此行中的任何输出,因此会话无法正常启动
  • 去掉空格解决了问题!谢谢。

标签: php database magento exception


【解决方案1】:

第一行 lib/Mandrill/Mandrill/Exports.php 脚本在 php 开始标记之前有一个空格。

【讨论】:

    猜你喜欢
    • 2016-06-17
    • 1970-01-01
    • 1970-01-01
    • 2019-03-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多