PHP - Headers already sent by ...

Page 1 / 1

Symptom

When you try to use the "header()", "setcookie()" or "session_start()" function of PHP. It shows you the error : Headers already sent by ...

 

Cause

This error has been made ​​that three functions mentioned above must be used before any HTML character. A simple space written out of tags <?php ?> or displayed by a "echo" in PHP can cause this error.

 

Resolution

Check your PHP file to find these HTML characters. PHP as shown on his page on the "header()" function, the most frequent cause is that files included (by include, require ...) featuring HTML characters.