Skip to content Skip to sidebar Skip to footer

Cannot Modify Header Information With Mail() And Header() Php With Ob_start()

I am sure you all know this error: Warning: Cannot modify header information - headers already sent by (output started at /homepages/4/d374499247/htdocs/wp-content/themes/tyler/mai

Solution 1:

Check your page encoding. Probably it UTF-8+ (with UTF-8 signature)

If not then you need to check white spaces.

Solution 2:

This error is being caused by the fact that you have already sent data to the client at the moment you are trying to send the headers (which should be sent first).

Most likely, you have some whitespace in the beginning of your file. Based on your current code example, it is hard to say for sure what exactly is causing the problem, but based on the fact that the error says it is on line 1 in your file, I'd say its whitespace.

Solution 3:

It's most likely there's a whitespace of some sort before your PHP tags (as the output starats at the very first line).

There can't be ANY output before the header(), not even whitespaces or line breaks.

Post a Comment for "Cannot Modify Header Information With Mail() And Header() Php With Ob_start()"