Warning: Cannot modify header information
By Paul
5/5 based on 1 vote. The median rating is 5.
By Paul
The "Cannot modify header information" warning means that there is output in the script before there's supposed to be. This could be for several reasons:
1) You have a error, warning or notice higher on the page.
2) You're in debug mode.
Solution: Not applicable. You will always get these warnings in debug mode since for debug mode to be useful it has to output the debug info at the time of processing rather than waiting... the script might fail before getting past all the HTTP header output, for all it knows. Simply ignore these header information warnings, and be aware that cookies will not be getting set while you're debugging.
3) You've been editing a file (perhaps config.php).
Solution: You must have left a space in the file above the top <? or below the bottom ?>. You need to ensure that there are no blank lines or spaces before the <? or after the ?>. Delete the extraneous space and save/upload the file, and the warning message will be gone.
1) You have a error, warning or notice higher on the page.
2) You're in debug mode.
Solution: Not applicable. You will always get these warnings in debug mode since for debug mode to be useful it has to output the debug info at the time of processing rather than waiting... the script might fail before getting past all the HTTP header output, for all it knows. Simply ignore these header information warnings, and be aware that cookies will not be getting set while you're debugging.
3) You've been editing a file (perhaps config.php).
Solution: You must have left a space in the file above the top <? or below the bottom ?>. You need to ensure that there are no blank lines or spaces before the <? or after the ?>. Delete the extraneous space and save/upload the file, and the warning message will be gone.
Rating:
5/5 based on 1 vote. The median rating is 5.
Submitted: 08/09/04 (Edited 03/02/06)
Description: Causes and solutions for this warning.
Views:
1250 views. Averaging 1 per day.
In the most recent 30 day period, there've been 2 views.

Print
E-Mail