checling that a session has expired

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
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

checling that a session has expired

Post by pelegk2 »

1)how can i check that a session has expired?
2)how can i check how much time left unttil a session will expire?

thnaks i advance
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

the session expires on it's own, using the settings your php install has for session cookie lifetime.
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

Post by pelegk2 »

i know that !
but it still dosent answer ny of my Q :)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

okay,
1. you can't really as long as you use autohandled sessions. (you can always have a "special" value in their session, and if that value disappears, it's a new session..)
2. that isn't possible with autohandled sessions. As long as the session hasn't expired, there is no time limit.

Since sessions technically only expire when the user closes their browser (or clears their cookies) .....
Post Reply