session variables expire or lose value???

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
cgchris99
Forum Newbie
Posts: 5
Joined: Thu Jun 02, 2005 7:35 pm

session variables expire or lose value???

Post by cgchris99 »

I have a simple website that lists events for Clubs.
There is a small group of php files
login.php
menu.php
insert.php
edit.php
delete.php
thankyou.php

After multiple insert.php (inserts records) the session variable will lose its value and I have to re-login.
Each of the above files have session_start() as the first line of code. There is some include code that does not have session_start but I'm not sure that matters.

The lost value doesn't seem to be operation related as much as time related. So I expect it is expiring. However, I have checked phpinfo and everything looks fine.

Now if I go to the website using Firefox I do not have any problems at all and stay logged in. Someone mentioned it could be P3P related to IE6.

Any ideas on what it could possibly be?
Syranide
Forum Contributor
Posts: 281
Joined: Fri May 20, 2005 3:16 pm
Location: Sweden

Post by Syranide »

COPY from another post I just made

1. make sure you don't redirect (without the sessionid at least)
2. turn on all error reporting, if output_buffering=on helps, then you are doing something wrong causing late header modifications which are discarded.
3. are you switching in the hierachy (up and down in folders) that might cause some problems, as certain security checks might fail auotmatically discarding sessions and such.

is it always on the same side or on different?

...

and make sure you always use start_session(), should be fine eitherway, but there are situation where it does not work with autostart... so do this whenever you are going to use sessions.
Post Reply