Hello Guys!

I get this error when I try to run one of my php page but I do not get this error in other page which are basically same.

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\go\birthday.php:1) in C:\xampp\htdocs\go\auth.php on line 2

I have tried like more then 20 hours but to no avail. So I hope you guys will shed some light in the problem.

I have trimmed down the code to make it easy to read.

With loads of Hope and Regards.
6pandn21

<?php
include("connect.php");
include("auth.php");

 
		
			<div class=\"entry\">";
			function CalculateAge($BirthDate)
			{}
		$a= session username;
		$f= mysql_query("SELECT query");
$id= mysql_fetch_array($f);
$b= $id['id'];

$result = mysql_query("SELECT query");

while($uid = Fetch array from result)
{
$BirthDate= $uid['birthday'];
echo div class=\"entry\">$uid[name]<br /></div>" .CalculateAge($BirthDate);
}
echo"</div>";
echo"<div style=\"clear: both;\">&nbsp;</div></div>";
?>

Where exactly are you calling session_start()? And that error just means you have some sort of output (check for spaces, newlines before your <?php tags) before you have called session_start(). If you have to do this, consider output buffering.

ya you are sending some thing before that, please use this function at the top of that page

<?php
ob_start();
?>

Where exactly are you calling session_start()? And that error just means you have some sort of output (check for spaces, newlines before your <?php tags) before you have called session_start(). If you have to do this, consider output buffering.

Hello guys!

Thank you very much for a very quick reply. Well yes the problem was output but I couldn't find it. I was using Notepad++ and there seemed to be nothing being outputted. Thank you death clock for the same suggestion. I then use NuSphere PhpEd and found out that there is a small - infront of <?php in the birthday. So all the time it was notepadd++ not working. Very disappointed with it now. Anyway Thank you very much for your help.

Kind Regards,
6pandn21

Really, Notepad++ didn't display the hyphen? That's very strange.

Yes it was indeed strange. Hopefully it was a one off though as I love the program.

6pandn21

I got Solution fo this

just open the file on notepad With ANSI, no utf-8

then delet this  at the top and re-save your file.

fix

This question has already been answered. Start a new discussion instead.