Warning: session_start() [function.session-start]: Cannot send session cache limiter

Thread Solved

Join Date: Jan 2009
Posts: 17
Reputation: 6pandn21 is an unknown quantity at this point 
Solved Threads: 0
6pandn21 6pandn21 is offline Offline
Newbie Poster

Warning: session_start() [function.session-start]: Cannot send session cache limiter

 
0
  #1
Jan 29th, 2009
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

  1. <?php
  2. include("connect.php");
  3. include("auth.php");
  4.  
  5.  
  6.  
  7. <div class=\"entry\">";
  8. function CalculateAge($BirthDate)
  9. {}
  10. $a= session username;
  11. $f= mysql_query("SELECT query");
  12. $id= mysql_fetch_array($f);
  13. $b= $id['id'];
  14.  
  15. $result = mysql_query("SELECT query");
  16.  
  17. while($uid = Fetch array from result)
  18. {
  19. $BirthDate= $uid['birthday'];
  20. echo div class=\"entry\">$uid[name]<br /></div>" .CalculateAge($BirthDate);
  21. }
  22. echo"</div>";
  23. echo"<div style=\"clear: both;\">&nbsp;</div></div>";
  24. ?>
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 357
Reputation: death_oclock will become famous soon enough death_oclock will become famous soon enough 
Solved Threads: 37
death_oclock's Avatar
death_oclock death_oclock is offline Offline
Posting Whiz

Re: Warning: session_start() [function.session-start]: Cannot send session cache limiter

 
0
  #2
Jan 29th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 13
Reputation: mr.khurrams is an unknown quantity at this point 
Solved Threads: 2
mr.khurrams mr.khurrams is offline Offline
Newbie Poster

Re: Warning: session_start() [function.session-start]: Cannot send session cache limiter

 
0
  #3
Jan 30th, 2009
ya you are sending some thing before that, please use this function at the top of that page

<?php
ob_start();
?>
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 17
Reputation: 6pandn21 is an unknown quantity at this point 
Solved Threads: 0
6pandn21 6pandn21 is offline Offline
Newbie Poster

Re: Warning: session_start() [function.session-start]: Cannot send session cache limiter

 
0
  #4
Jan 30th, 2009
Originally Posted by death_oclock View Post
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
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 357
Reputation: death_oclock will become famous soon enough death_oclock will become famous soon enough 
Solved Threads: 37
death_oclock's Avatar
death_oclock death_oclock is offline Offline
Posting Whiz

Re: Warning: session_start() [function.session-start]: Cannot send session cache limiter

 
0
  #5
Jan 30th, 2009
Really, Notepad++ didn't display the hyphen? That's very strange.
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 17
Reputation: 6pandn21 is an unknown quantity at this point 
Solved Threads: 0
6pandn21 6pandn21 is offline Offline
Newbie Poster

Re: Warning: session_start() [function.session-start]: Cannot send session cache limiter

 
0
  #6
Jan 30th, 2009
Originally Posted by death_oclock View Post
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
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC