Cannot modify header information

This is one of the weirdest errors I ran into. The full error:

Warning: Cannot modify header information – headers already sent by (output started at /home/mysite/public_html/some.php:23) in /home/mysite/public_html/someother.php on line 69

In most cases the solution to this is removing any leading and trailing spaces of your php open and close tags in the some.php file. In other words, remove all spaces before your < ?php tag and after your ?> tag

A simple but very strange solution…

Note: remove the space between the ‘<' and '?php', this is merely done so it gets displayed on this page. 😉

Leave a Reply

Your email address will not be published. Required fields are marked *