Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headers already sent in Magento #25

Open
trev opened this issue Feb 5, 2014 · 5 comments
Open

Headers already sent in Magento #25

trev opened this issue Feb 5, 2014 · 5 comments

Comments

@trev
Copy link
Contributor

trev commented Feb 5, 2014

I get the following when viewing a category page in Magento:

</pre>
2014-02-05T06:28:00+00:00 DEBUG (7): HEADERS ALREADY SENT: <pre>[0] /vagrant/app/code/core/Mage/Core/Controller/Response/Http.php:52
[1] /vagrant/lib/Zend/Controller/Response/Abstract.php:766
[2] /vagrant/app/code/core/Mage/Core/Controller/Response/Http.php:83
[3] /vagrant/app/code/core/Mage/Core/Controller/Varien/Front.php:184
[4] /vagrant/app/code/core/Mage/Core/Model/App.php:354
[5] /vagrant/app/Mage.php:684
[6] /vagrant/index.php:87
</pre>

I've identified the issue to be somewhere around VafJs_Submits and VafJs_Loader_Ajax classes in vafAjax.js.include.php.

If you add a a simple return "test"; statement right after the function main() { declaration for both classes you don't get any Headers already sent... mesage. Which I supposed indicates that the problem reside in include().

I'm pretty stumped to be honest, I also don't understand why you use output buffering and not just return a string from a a wrapping function in your included file.

@trev
Copy link
Contributor Author

trev commented Feb 6, 2014

Ok, so I understand a bit more about what's going on but I'm still stumped as to why the headers are already sent.

Further debugging reveals 2014-02-05T23:46:39+00:00 DEBUG (7): Cannot send headers; headers already sent in /vagrant/app/code/local/Elite/vendor/vehiclefits/library/library/VF/html/vafAjax.js.include.php, line 95

Which is consistent with what I wrote/discovered above. I just can't pinpoint what's causing the issue.

@trev
Copy link
Contributor Author

trev commented Feb 6, 2014

@kylecannon I'd be happy to donate some $$ if you can help me solve this issue.

@kylecannon
Copy link
Member

Even though this error occurs it technically doesn't cause any harm. I will see what I can do to get the error to subside.

@trev
Copy link
Contributor Author

trev commented Feb 17, 2014

Thanks @kylecannon

@krishana
Copy link

krishana commented Feb 9, 2015

I have already fixed this error in my current project.

For error track need some changes in core files

Follow this link
http://codegento.com/2011/03/debugging-headers-already-sent-error/

Now check var/log/system.log file.

In log file you get exact file path and check that.

I hope it will help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants