1

While in a CMS page, when I click on "Insert image", it creates the following error. This error is repeated for the number of images displayed in the popup window! If the pop up displays 6 images, the error is repeated 6 times in the system.log.

But clicking on the "Insert image", pointing to the same folder, the second or third time the error is not generated.

What is causing this? How can I prevent this error from being generated? Is this some how being cached?

Note: I have tried turning off all my third party extensions, but it produces the same errors.

2016-08-20T22:26:59+00:00 DEBUG (7): HEADERS ALREADY SENT: <pre>[0] /home/magento/app/code/core/Mage/Core/Controller/Response/Http.php:52
[1] /home/magento/lib/Zend/Controller/Response/Abstract.php:768
[2] /home/magento/app/code/core/Mage/Core/Controller/Response/Http.php:84
[3] /home/magento/app/code/core/Mage/Core/Controller/Varien/Front.php:184
[4] /home/magento/app/code/core/Mage/Core/Model/App.php:354
[5] /home/magento/app/Mage.php:684
[6] /home/magento/index.php:91
</pre>
0

The problem is caused by the fact that headers are sent twice when your code is called. You probably have a module doing this as its not the default Magento behavior.

I suggest you have a look at the two answers from Alan Storm here to debug the issue: https://stackoverflow.com/questions/4670031/magento-debug-headers-already-sent-error

  • Thank you for your reply. Trying @Alan Storm method 1, produced a log of 167 record long. The second method modifying Abstract.php produced the following additional lines 2016-08-21T14:51:55+00:00 DEBUG (7): File: /home/magento/lib/Varien/Image/Adapter/Gd2.php and 2016-08-21T14:51:55+00:00 DEBUG (7): Line: 172 . But I do not know how to debug this. Any ideas? – user2774042 Aug 21 '16 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.