Problem with sessions

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

PHP is great!

Poll ended at Sat May 03, 2003 10:53 am

Yes
9
100%
No
0
No votes
Not Sure
0
No votes
 
Total votes: 9

leebies
Forum Newbie
Posts: 9
Joined: Wed Apr 23, 2003 3:18 am

Problem with sessions

Post by leebies »

Hello people,

I hope all are well. I am getting this error message:
Warning: Cannot send session cache limiter - headers already sent (output started at /home/childc/public_html/news/news.php:26) in /home/childc/public_html/functions/sessions.php on line 13
On some of my pages. Have you any ideas? They are pages seperate from the program I created (http://www.childcarejobs.co.uk). But I use the same header files.

Hope you can help. Cheers - Leebies :)
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Have a read of viewtopic.php?t=1157 - there needs to be no output to the browser before the call to session_start(). Generally if you can make session_start() the first line in the script you shouldn't have this problem.

Mac
leebies
Forum Newbie
Posts: 9
Joined: Wed Apr 23, 2003 3:18 am

Solved

Post by leebies »

Thanks. I didnt realise that an empty line before the session classed as a output! But from now on I must remember to make sure there is no gap! Cheers
Post Reply