Fork me on GitHub Open Source
Knowledgebase
Commentics > Support > Knowledgebase

Search help:


I get a headers already sent error?

Solution

Sometimes you might see an error message starting with:

Warning: Cannot modify header information - headers already sent

This is often caused by a blank space or an extra line at the beginning or end of the file. Open the file mentioned and remove any extra spaces or lines before the first <?php tag and after the closing ?> tag.

If you can't see any blank spaces or lines before the first <?php tag, it's possible that whatever editor you are using to edit the file is inserting a BOM (Byte Order Mark) at the beginning of the file and this would be invisible to you or me. If you open the file in a source code editor like Notepad++, click 'Encoding' from the menu and select 'Convert to UTF-8 without BOM' then this may fix it.

 
Was this article helpful? yes / no
Related articles How do I fix a strange problem?
How do I change the text?
Article details
Article ID: 30
Category: Server
Date added: 2011-08-25 21:59:33
Views: 1589
Rating (Votes): Article rated 3.3/5.0 (24)

 
« Go back

 
Powered by Help Desk Software HESK, brought to you by SysAid