Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Error when creating/saving products “Cannot send headers; headers already sent in”
 
Gman2005
Member
 
Total Posts:  40
Joined:  2008-02-16
 

Error when creating/saving products:

Cannot send headersheaders already sent in /home/content/g/m/a/*****/html/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.phpline 350
Trace
:
#0 /home/content/g/m/a/*****/html/lib/Zend/Controller/Response/Abstract.php(147): Zend_Controller_Response_Abstract->canSendHeaders(true)
#1 /home/content/g/m/a/*****/html/app/code/core/Mage/Adminhtml/Controller/Action.php(236): Zend_Controller_Response_Abstract->setRedirect('http://www.naut...')
#2 /home/content/g/m/a/*****/html/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(360): Mage_Adminhtml_Controller_Action->_redirect('*/*/edit', Array)
#3 /home/content/g/m/a/*****/html/app/code/core/Mage/Core/Controller/Varien/Action.php(342): Mage_Adminhtml_Catalog_ProductController->saveAction()
#4 /home/content/g/m/a/*****/html/app/code/core/Mage/Core/Controller/Varien/Router/Admin.php(148): Mage_Core_Controller_Varien_Action->dispatch('save')
#5 /home/content/g/m/a/*****/html/app/code/core/Mage/Core/Controller/Varien/Front.php(146): Mage_Core_Controller_Varien_Router_Admin->match(Object(Mage_Core_Controller_Request_Http))
#6 /home/content/g/m/a/*****/html/app/Mage.php(427): Mage_Core_Controller_Varien_Front->dispatch()
#7 /home/content/g/m/a/*****/html/index.php(40): Mage::run()
#8 {main}

Anyone, Anyone?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gman2005
Member
 
Total Posts:  40
Joined:  2008-02-16
 

I really need a solution for this. I need to start adding products to my sight ASAP.

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mozac
Jr. Member
 
Total Posts:  2
Joined:  2008-06-17
 

i have absolute the same problem

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gman2005
Member
 
Total Posts:  40
Joined:  2008-02-16
 

help! time is money. i need help asap.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mozac
Jr. Member
 
Total Posts:  2
Joined:  2008-06-17
 

here is solution

file /app/code/core/Mage/Catalog/Model/resource/Eav/MySQL4/Products/Attribute/Backend/Tierprice.php in incorrectly named as Tierprice.php06604 , renaming it to Tierprice.php solves the problem

good luck smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gman2005
Member
 
Total Posts:  40
Joined:  2008-02-16
 

nope, tierprice.php is named correctly.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gman2005
Member
 
Total Posts:  40
Joined:  2008-02-16
 

I still need help with this error.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sacadaNet
Jr. Member
 
Total Posts:  1
Joined:  2008-06-21
 

Hi Gman2005,

Do you have a solution yet. I have the same problem when running the Install.php.

I was wondering if I ran the Install.php before I had all the permissions set right and that caused to problem. I don’t want to have to go through the whole upload process again. If I have to, can anyone list which files would have changed and should be re-uploaded.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gman2005
Member
 
Total Posts:  40
Joined:  2008-02-16
 

No I don’t have a solution.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gman2005
Member
 
Total Posts:  40
Joined:  2008-02-16
 

BUMP. HELP PLEASE!

 
Magento Community Magento Community
Magento Community
Magento Community
 
shashi_lo
Jr. Member
 
Total Posts:  23
Joined:  2008-05-14
 

Follow the first post by Moshe.  After putting these SQL commands in my transfer, it fixed my headers already sent and cache, foreign key, errors.  Hope this helps other people as well.

http://www.magentocommerce.com/boards/viewthread/2921

 
Magento Community Magento Community
Magento Community
Magento Community
 
Fibo
Sr. Member
 
Avatar
Total Posts:  107
Joined:  2008-06-25
Marseille, France
 

In case Sashi_lo’s suggestion does not work you might prefer do some php-type changes.

1 - “headers already sent” is a classical problem with php. It usually happens when php starts sending some character to the client’s browser, eg a space.
PHP notices that it has already sent something, and so the header is already sent…

Where do these come from:
- common source is a space or an empty line outside of the <?php ?> protective bracket; most commonly a space on the first line of SOME php (or phtml) file, eg a file brought in by a php instruction like ‘include’ or ‘require’
In the case of Magento:
- the code uses extensively the new ‘standard’ that included files should start with <?php but have no ?> at the end: this suppresses any problem at the end of the file.
- almost all files are encoded in UTF-8 / Unicode. If you are editing one of these files with a non-compliant editor, this will sometimes create and additional invisible character before the <?php

SOLUTION:
- if you have made any change to a php or phtml file, check in this file that there is no extra character before <?
- if this does not solve your problem, check and save the file with an utf-8 compliant editor. The standard windows notepad does that. I personally use the (commercial) Ultra-Edit which is saving me lots of troubles with utf8 and other subtle problems.
- if you have made no change to any file… then this is not the solution!

 
Magento Community Magento Community
Magento Community
Magento Community
 
gwarriner
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2008-11-03
 

I’ve been searching extensively for a solution to this, and finally found it - thank you Fibo!  The problem in my situation was the encoding of the files - I opened the file in question in TextPad, with the default encoding set to UTF-8 and saved the file.  That’s it!

Again, thank you so much for taking the time to share this information!  This is an excellent product, with an even better community of users! cheese

 
Magento Community Magento Community
Magento Community
Magento Community
 
usedjdm
Jr. Member
 
Total Posts:  24
Joined:  2009-10-17
 

I found if you follow the path in the listed error and open the php pahe that you will see this

<?php
// Copyright 2009
?>

Remove that and you will be good. I have seen this on many pages and it messes thing up

 
Magento Community Magento Community
Magento Community
Magento Community
 
aldovandenberg
Jr. Member
 
Total Posts:  1
Joined:  2011-03-31
 

Can soneone help me out with the error below.

Cannot send headers; headers already sent in /home/ab5909985/domains/snowsummit.nl/public_html/lib/Zend/Cache/Backend/File.php, line 1

Trace:
#0 /home/ab5909985/domains/snowsummit.nl/public_html/lib/Zend/Controller/Response/Abstract.php(115): Zend_Controller_Response_Abstract->canSendHeaders(true)
#1 /home/ab5909985/domains/snowsummit.nl/public_html/app/code/core/Mage/Core/Model/App.php(1188): Zend_Controller_Response_Abstract->setHeader(’Content-Type’, ‘text/html; char...’)
#2 /home/ab5909985/domains/snowsummit.nl/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(80): Mage_Core_Model_App->getResponse()
#3 /home/ab5909985/domains/snowsummit.nl/public_html/app/code/core/Mage/Core/Model/Url/Rewrite.php(185): Mage_Core_Controller_Varien_Front->getResponse()
#4 /home/ab5909985/domains/snowsummit.nl/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(166): Mage_Core_Model_Url_Rewrite->rewrite()
#5 /home/ab5909985/domains/snowsummit.nl/public_html/app/code/core/Mage/Core/Model/App.php(340): Mage_Core_Controller_Varien_Front->dispatch()
#6 /home/ab5909985/domains/snowsummit.nl/public_html/app/Mage.php(627): Mage_Core_Model_App->run(Array)
#7 /home/ab5909985/domains/snowsummit.nl/public_html/index.php(80): Mage::run(’’, ‘store’)
#8 {main}

The problem started with security error
I did follow the instuctions below

It is a known error and here is the solution:
Go to errors folder on most of the servers it would be: “/public_html/errors”
Find local.xml.sample and remove word sample and the dot making it: local.xml.
In the root of Magento create “tmp” folder
Go to “/public_html/lib/Zend/Cache/Backend/File.php” and find this line:
protected $_options = array(
‘cache_dir’ => ‘null’,

change directory from “null” to “tmp/”, it should look like this:

protected $_options = array(
‘cache_dir’ => ‘tmp’,

Save and test smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
severinolorilla
Jr. Member
 
Total Posts:  4
Joined:  2012-11-19
 

Thanks a lot Fibo.. Deleting extra spaces worked. :D

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top