Warning: session_start() error

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
pauls74462
Forum Newbie
Posts: 16
Joined: Tue Jun 10, 2008 8:13 pm

Warning: session_start() error

Post by pauls74462 »

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/roijrofeiefot4085t/public_html/fgop/fwi/0orfp.php:10) in /home/roijrofeiefot4085t/public_html/fgop/fwi/0orfp.php on line 13
While trying to get sessions to work I got the above error. How do I remove it, I tryed:

Code: Select all

 
unset($_SESSION['views']);
unset($_SESSION['count']);
 
Didn't wrk

Paul
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Warning: session_start() error

Post by requinix »

You can't call session_start after something's been outputted.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Warning: session_start() error

Post by requinix »

If you want more help, ask here in the forums, not over PM.
pauls74462 wrote:Subject: Warning: session_start() error
tasairis wrote:You can't call session_start after something's been outputted.

I put the code you suggested and got this error 2 times.
Fatal error: Maximum execution time of 30 seconds exceeded in /home/pauls744/public_html/schools/Test/TestRiteA.php on line 8
Post some code. My guess is an infinite loop, but it could be one of many other things.
Post Reply