Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot send session cache limiter - No session being set though!!

Status
Not open for further replies.
Jul 28, 2005
358
FR
Why am I getting this error
Code:
Warning: session_register(): Cannot send session cookie - headers already sent by (output started at /home/ecannes/public_html/templates/azur/head.html:3) in /home/ecannes/public_html/search/conf.php on line 2

when I am not setting any sessions at all on this page. I just load header, footer and maincontent page from a single php file (and some css) but don't do anything else.

Richard
 
Headers need to be sent before any other content is sent to the browser. So your session initiation should appear before:
1. any echo or print statement;
2. any html output before <?php ?> tags
3. any white space (carriage return, space) before <?php ?> tags
Also, check for these three things in any included files.

Lastly, try not use session_register when working with sessions. It relies on register globals being set to on, which is a bad idea. More on sessions here:
 
I know all that but thanks anyway.

The thing is that I am NOT doing anything with sessions or cookies anyway!!

I have since found out that the server was changed yesterday (moved to a dedicated one) and this seems to have avrious updated files missing.

Still strange as I'm not using sessions though.

Richard
 
Well, error points to a line 2 in the conf.php file in the search directory. What, if not session_register, is there?
 
Purely database connection details in that file. Nothing at all to do with sessions.
 
What about a snippet of the code? Seeing is better than reading descriptions of it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top