Website Scripts And Cloud Tutorials

Warning: session_start(): Cannot send session cookie headers already sent

Byadmin

Feb 26, 2010 ,
Click to rate this tutorial!
[Total: 3 Average: 4]

Some times when you intergrate your existing wordpress blog with an external website or at times when you go for something like
<?php
require_once('body.php');
?>

2.php
<?php
session_start();
?>
in your webpage, you will be getting a warning stating that
Warning: session_start(): Cannot send session cookie headers already sent
To eliminate this warning it is pretty simple just add this code
<?php

ob_start();

<!–YOUR INCLUDE SCRIPT HERE–>

ob_end_clean();

?>
Thats all, issue is fixed have a nice day.

Click to rate this tutorial!
[Total: 3 Average: 4]

Leave a Reply

Your email address will not be published.