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

Reply

Join Date: Aug 2009
Posts: 3
Reputation: jeyakannanrd is an unknown quantity at this point 
Solved Threads: 0
jeyakannanrd jeyakannanrd is offline Offline
Newbie Poster

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

 
0
  #1
Aug 14th, 2009
Please help me.

I got this error while uploading in Server. I developed this code in windows based. But the deployed server is Linux Server. In windows server i didn't get this session error.

Here is my code:
  1. <?php session_start();
  2. require_once('l2t_connect.php');
  3. if($_GET['action'] == "send")
  4. {
  5. if(isset($_REQUEST['btnSend']))
  6. {
  7. $key=substr($_SESSION['key'],0,5);
  8. $number = $_REQUEST['number'];
  9. if($number!=$key)
  10. {
  11. $message = "Please enter the correct Code!";
  12. }
  13. }
  14. }
  15. <?php } ?>

Thank you in advance!!!!!!
Last edited by peter_budo; Aug 14th, 2009 at 1:10 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,544
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 137
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Posting Virtuoso

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

 
0
  #2
Aug 14th, 2009
That last line would have been a real bug. Try the following:
  1. <?php session_start();
  2. require_once('l2t_connect.php');
  3. if($_GET['action'] == "send")
  4. {
  5. if(isset($_REQUEST['btnSend']))
  6. {
  7. $key=substr($_SESSION['key'],0,5);
  8. $number = $_REQUEST['number'];
  9. if($number!=$key)
  10. {
  11. $message = "Please enter the correct Code!";
  12. }
  13. }
  14. }
Also make sure l2t_connect.php does not contain session_start(). Good luck.
Try not to bump 10 year old threads as it can be really annoying.
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*`
My favourite PC. - Oopy Doopy Do 2U2!
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 3
Reputation: jeyakannanrd is an unknown quantity at this point 
Solved Threads: 0
jeyakannanrd jeyakannanrd is offline Offline
Newbie Poster

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

 
0
  #3
Aug 14th, 2009
Thank you for your reply.
But the Same error comes again. This is my Actual coding.
  1. <?php session_start();
  2. require_once('l2t_connect.php');
  3. if($_GET['action'] == "send")
  4. {
  5. if(isset($_REQUEST['btnSend']))
  6. {
  7. $key=substr($_SESSION['key'],0,5);
  8. $number = $_REQUEST['number'];
  9. if($number!=$key)
  10. {
  11. $message = "Please enter the correct Code!";
  12. }
  13. else
  14. {
  15. $sqlAdd="INSERT INTO l2t_enquiry (name, email, conno, comment, is_answered, is_deleted)
  16. VALUES
  17. ( '".$_POST['enq_name']."',
  18. '".$_POST['emailid']."',
  19. '".$_POST['conno']."',
  20. '".$_POST['comments']."',
  21. 'true',
  22. 'true')";
  23. $resultAdd = mysql_query($sqlAdd);
  24. }
  25. }
  26. }
  27. ?>
Last edited by peter_budo; Aug 14th, 2009 at 1:10 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,544
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 137
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Posting Virtuoso

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

 
0
  #4
Aug 14th, 2009
Perhaps php short tags might make a difference. Below is an example and I fixed a mysql bug at the same time.
  1. <? session_start();
  2. require_once('l2t_connect.php');
  3. if($_GET['action'] == "send")
  4. {
  5. if(isset($_REQUEST['btnSend']))
  6. {
  7. $key=substr($_SESSION['key'],0,5);
  8. $number = $_REQUEST['number'];
  9. if($number!=$key)
  10. {
  11. $message = "Please enter the correct Code!";
  12. }
  13. else
  14. {
  15. $sqlAdd="INSERT INTO l2t_enquiry (name, email, conno, comment, is_answered, is_deleted) VALUES ( '".
  16. mysql_real_escape_string($_POST['enq_name'])."', '".mysql_real_escape_string($_POST['emailid']).
  17. "', '".mysql_real_escape_string($_POST['conno'])."', '".mysql_real_escape_string($_POST['comments']).
  18. "', 'true', 'true')";
  19. $resultAdd = mysql_query($sqlAdd);
  20. }
  21. }
  22. }
  23. ?>
If that doesn't work then make sure there are no spaces/tabs before the <? as that will also cause an error. Also please use code tags like I have above as it make the code so much more readable.
Try not to bump 10 year old threads as it can be really annoying.
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*`
My favourite PC. - Oopy Doopy Do 2U2!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 544 | Replies: 3
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC