Strange Session 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
Caped Knight
Forum Commoner
Posts: 33
Joined: Wed Jan 01, 2003 6:20 pm
Location: Somewhere...out there...

Strange Session Error

Post by Caped Knight »

Warning: Cannot send session cache limiter - headers already sent (output started at c:\apache\htdocs\forums2\viewtopic.php:1) in c:\apache\htdocs\forums2\viewtopic.php on line 3
Earlier it was saying it couldn't send cookies for the same reason (so I turned them off). Anyone know what this means and how I can fix it?

Thanks.
User avatar
Gianni_T
Forum Newbie
Posts: 8
Joined: Fri Aug 01, 2003 12:47 am
Location: Bari, Italy
Contact:

Post by Gianni_T »

From http://it.php.net/manual/en/function.session-start.php:
Note: If you are using cookie-based sessions, you must call session_start() before anything is output to the browser.
Perhaps in your script, at line 1, something is generating an output (like an error message)
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Have you had a look at the stickies in this forum? There's one covering that very error message.

Mac
Caped Knight
Forum Commoner
Posts: 33
Joined: Wed Jan 01, 2003 6:20 pm
Location: Somewhere...out there...

Post by Caped Knight »

I didn't see it. Sorry, Mac.

It turns out I had a space before the <?php I wasn't aware of.
Post Reply