Jump to content

[SOLVED] PHP session errors Warning: session_start(): Cannot send session cache limiter -


cooldude832

Recommended Posts

I have a script that says

<?

session_start();

ob_start();

?>

 

and it gives me

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /hsphere/local/home/pira00/upperstraitscleanlake.org/horse/login.php:1) in /hsphere/local/home/pira00/upperstraitscleanlake.org/horse/login.php on line 2

 

 

why?

 

my autosession start is set to manual and i think i'm running php 4.4.4

Link to comment
Share on other sites

sessions use cookies...if output has been sent to the browser before it can send the cookie header, it will fail.

 

EDIT:

 

This means that if you have a newline at the top of your php script, before the opening tag, it will output a newline...which will cause your header to fail...

 

///top of file, blank "newline" can't be here
<?php
....
?>

Link to comment
Share on other sites

There have been instances of some editors putting an unprintable character at the very start of the file. What editor do you use to write your script?

 

Try deleting the "<?php" line and retyping it.

 

Ken

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.