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

This Tutorial Has Been Viewed 1,386 Times.

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.

VN:F [1.9.13_1145]
Rating: 6.5/10 (2 votes cast)
VN:F [1.9.13_1145]
Rating: -2 (from 2 votes)

Warning: session_start(): Cannot send session cookie headers already sent, 6.5 out of 10 based on 2 ratings

Incoming search terms:





You will also be interested in ,

Tags: ,

Leave a Reply

Spam protection by WP Captcha-Free

Proudly designed by Mistonline.in.
Affordable Seo PackagesSeo BlogEdu Backlinks
More in PHP, scripts (87 of 149 articles)