session management on server

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
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

session management on server

Post by itsmani1 »

I wanted to know when a user don't logout properly and instead of it just closed browser window how server comes to know that this session has been closed?

for example i open a page and login after some time instead of signing out i just closed my browser window, now how the server will come to know that session has been expired? or session has been closed.

Note: I am using php script with apache web server.

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

Post by feyd »

Browsers typically dump any and all sessions immediately upon closing. Unless you maintained your session id across browser instances, the server will not see it and will issue a new one. Sessions also expire after a long enough period of no use on the server. The server will remove the associated data on regular intervals.
Post Reply