Main menu:

Site search

Categories

Archive

How to solve the PHP Error Warning: Cannot modify header information

That message is the bane of anyone that used the header function to forward to a new Location. Any output from PHP before that command will cause it to fail with a Warning: Cannot modify header information - headers already sent by…

Things to check…

Look at the :number in the message “headers already sent by (output started at /public_html/something.php:581)” This should take you right to it.

Make sure your require and include directives do not have any output. This includes blank lines not wrapped by a < ? ?>.

Make sure your main file does not have any blank lines or output before the header function.

still running into an error???

I had an instance where it said on line 1 there was output. Line one was

deleted it and all was fine.

Write a comment