Cannot send session cookie / cache limiter error in hosting

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sajhak
Forum Newbie
Posts: 2
Joined: Sun May 10, 2009 6:07 am

Cannot send session cookie / cache limiter error in hosting

Post by sajhak »

Hi all,

Im quite new to PHP development. Recently I hosted a simple php application in a hosting server, and getting the following two errors in the top of the page when i try to access the application. But the strange thing is that, Im not getting this error messages when it is deployed in my local environment.

Listed below are the two exceptions im getting :

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/server/group/test/index.php:2) in /home/server/group/test/loginchecker.php on line 2

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/server/group/test/index.php::2) in /home/server/group/test/loginchecker.php on line 2

Thanks in advance
sajhak
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Cannot send session cookie / cache limiter error in host

Post by Celauran »

Headers already sent is a pretty common problem. A common culprit is extraneous blank lines in included files.
Post Reply