0

I've got a problem while running Magento. I am quite unsure about what I could have changed in the configuration of Magento and unfortunately I cannot remember. If I could I would try to reset that.

Suddenly the following problem came up while logging in into the backend of Magento.

What I have already tried: - for sure, I checked the line 645. I cannot find any problems there. I found some tipps, that i have to check if there is a hidden space. But it isn\\’t. - i tried to save the file with notepad++ to UTF-8. But no changes.

Error Code:

Cannot send headers; headers already sent in C:\\\\XAMPP\\\\xampp\\\\htdocs\\\\magento\\\\app\\\\Mage.php, line 645

Trace:
#0 C:\\\\XAMPP\\\\xampp\\\\htdocs\\\\magento\\\\lib\\\\Zend\\\\Controller\\\\Response\\\\Abstract.php(115): Zend_Controller_Response_Abstract->canSendHeaders(true)
#1 C:\\\\XAMPP\\\\xampp\\\\htdocs\\\\magento\\\\app\\\\code\\\\core\\\\Mage\\\\Core\\\\Model\\\\App.php(1151): Zend_Controller_Response_Abstract->setHeader(\\\’Content-Type\\\’, \\\’text/html; char...\\\’)
#2 C:\\\\XAMPP\\\\xampp\\\\htdocs\\\\magento\\\\app\\\\code\\\\core\\\\Mage\\\\Core\\\\Controller\\\\Varien\\\\Front.php(80): Mage_Core_Model_App->getResponse()
#3 C:\\\\XAMPP\\\\xampp\\\\htdocs\\\\magento\\\\app\\\\code\\\\core\\\\Mage\\\\Core\\\\Controller\\\\Varien\\\\Router\\\\Standard.php(207): Mage_Core_Controller_Varien_Front->getResponse()
#4 C:\\\\XAMPP\\\\xampp\\\\htdocs\\\\magento\\\\app\\\\code\\\\core\\\\Mage\\\\Core\\\\Controller\\\\Varien\\\\Front.php(177): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#5 C:\\\\XAMPP\\\\xampp\\\\htdocs\\\\magento\\\\app\\\\code\\\\core\\\\Mage\\\\Core\\\\Model\\\\App.php(304): Mage_Core_Controller_Varien_Front->dispatch()
#6 C:\\\\XAMPP\\\\xampp\\\\htdocs\\\\magento\\\\app\\\\Mage.php(596): Mage_Core_Model_App->run(Array)
#7 C:\\\\XAMPP\\\\xampp\\\\htdocs\\\\magento\\\\index.php(80): Mage::run(\\\’\\\’, \\\’store\\\’)
#8 {main}
PeeHaa
  • 71,436
  • 58
  • 190
  • 262
user1126150
  • 1
  • 1
  • 1
  • What is the code in line 645? – Pekka Jan 02 '12 at 11:42
  • 1
    Seems like you edit some file in some ugly text editor which adds BOM signature to the beginning of the file. Try to remember which file you has changed, open it with notepad++ and save as utf8 without BOM. – Dmytro Zavalkin Jan 02 '12 at 12:24
  • Does the error only show for backend or also the frontend? What about the login screen itself? If the error isn't always then it cannot be in `Mage.php` since that is used for all pages regardless. – clockworkgeek Jan 02 '12 at 16:04
  • Did you use a Zend_debug::dump or a var_dump instruction anywhere in your code for debug purpose? A similar error appears if there is a dump in a wrong place... Maybe you left it somewhere behind? – mcmil Jan 03 '12 at 11:10
  • possible duplicate of [How to fix "Headers already sent" error in PHP](http://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php) – Madara's Ghost May 11 '14 at 08:58

3 Answers3

1

Did you change anything inside the local.xml file? Just to be sure, the file should be saved UTF8 without boom option.

Oğuz Çelikdemir
  • 4,990
  • 4
  • 30
  • 56
0

While developing always disable caches under cache Management and as well clear your browser cache.

Linux Packet
  • 186
  • 1
  • 1
  • 7
0

I have gotten this problem. You copy local.xml in app/etc from sample and edit it. Not create new.

Knase
  • 1,224
  • 14
  • 23