session_start(): Cannot send session cache limiter – headers already sent

Error Message: session_start(): Cannot send session cache limiter – headers already sent. There can be many possibilities when it will show above mentioned error.

Some of the reasons are :

  • Some white space before <?php ¬†php start tag of after ?> php close tag

  • Session is not started in the top of the code

  • There may be some space before starting on session

  • There may be some echo before session

  • There may be some notifications or warnings printed

Some Tricks

  • Remove white spaces from the top of the file or included file

  • Remove white space before session_start()

  • Write session_start() at the top of the file

  • Display warning notification of:

error_reporting(e_all);

ini_set(‘display_errors’, 0);

  • There should not be an echo used before header redirect

Coding Tag

Coding Tag always happy to serve you in Information Technology (IT). Learn HTML, CSS, Javascript, PHP, Android, Digital Marketing, Latest IT News and many more.

Leave a Reply

avatar
  Subscribe  
Notify of