Warning: Cannot modify header information
Warning: Cannot modify header information
By Paul
08/09/04 (Edited 01/30/14)
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.
Solution: Deal with the other error.
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 PHP file -- perhaps config.php or a /plugins/ or /modifications/ directory file.
Solution: You must have left a space in the file above the top <?php or below the bottom ?> in the file by accident. You need to ensure that there are no blank lines or spaces before the <?php or after the ?>. Delete the extraneous space and save/upload the file, and the warning message will be gone.
By Paul
08/09/04 (Edited 01/30/14)
1) You have a error, warning or notice higher on the page.
Solution: Deal with the other error.
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 PHP file -- perhaps config.php or a /plugins/ or /modifications/ directory file.
Solution: You must have left a space in the file above the top <?php or below the bottom ?> in the file by accident. You need to ensure that there are no blank lines or spaces before the <?php or after the ?>. Delete the extraneous space and save/upload the file, and the warning message will be gone.
Description | Causes and solutions for this warning. |
Rating | |
Views | 1462 views. Averaging 0 views per day. |