Wednesday, January 21, 2009

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

I made some php scripts for a while now and it is the first time that I encounter this error:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\day4\index.php:9) in C:\xampp\htdocs\day4\index.php on line 10


I searched google to see if could find the answer, on one forum I found this thread that said to move the session_start(); to the very top of your source code

So i did that and it worked, I didn't get the error anymore.

Bottom line is, you put session_start() at the very top of your code, otherwise you will get this error.

Send me some smiles ^_^.

3 comments:

Chris said...

yeah! your right! i thought that our teacher in DB-2 "ph Programing" also told us to put session start at the very top of the code... good luck to your programing.. ^_^

Hellen Werinusa said...

Thanks for your sharring :)

jamesmalibiran said...

^^,) di gd ko aware ana..hahaha! sa pinakataas man pd gd nako ginabutang pirme..