Something I don't think others have mentioned yet is tht a common reason for this error is when there is an error somewhere in your script prior to the header() call. Because PHP will output the error to the screen (assuming you don't have any special error handling), it might not be you who is generating output but rather PHP due to an error somewhere. It might even just be a warning. So, the error you are receiving might be a bit misleading.

My advice would be to take the header() call out for the moment, and see if you get any output on the screen. If you see something, you've found the problem. If you don't see anything, check for any possible places where whitespace might be output (as others have suggested).


Paul wrote:

Warning: Cannot add header information - headers already sent by (output
started by.. ..line 6) ...on line 12

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to