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

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
....
?>

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.