...

View Full Version : Cannot send session cookie, cannot send session cahce limiter



manicman
09-02-2006, 09:51 PM
I am trying to create a user system for my website, when I log in I get these errors:


Warning: session_start(): Cannot send session cookie - headers already sent by (output started at c:\documents and settings\administrator\desktop\intranet\development\final\admin\main.php:9) in c:\documents and settings\administrator\desktop\intranet\development\final\admin\main.php on line 10

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\documents and settings\administrator\desktop\intranet\development\final\admin\main.php:9) in c:\documents and settings\administrator\desktop\intranet\development\final\admin\main.php on line 10


Can anyone tell me how to get around this? I have tried removing all the 'white space'. :)

googleit
09-02-2006, 10:40 PM
have you put

session_start()
on line 1?

Lee Stevens
09-02-2006, 11:45 PM
Yeah that should be your first line in your script and make sure its not included anywere else in the script!

manicman
09-03-2006, 08:44 AM
It is on the first line of the php code but before that I have all the HTML DOCTYPE etc. I take it I should put session_start() on the very first line before the HTML stuff?

Thanks. :)

Lee Stevens
09-03-2006, 09:01 AM
Should be the first line wraped in <?php and ?>

manicman
09-03-2006, 07:35 PM
Yep, it is the first line wrapped in the first set of PHP tags on the page.

Fumigator
09-03-2006, 08:18 PM
I take it I should put session_start() on the very first line before the HTML stuff?


Correct.

manicman
09-04-2006, 03:16 PM
Thanks, I have got it working now. :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum