how to set a session to destroy itself unset whatever in a certain amount of time

Reply

Join Date: Apr 2009
Posts: 290
Reputation: SKANK!!!!! is an unknown quantity at this point 
Solved Threads: 2
SKANK!!!!!'s Avatar
SKANK!!!!! SKANK!!!!! is offline Offline
Posting Whiz in Training
 
0
  #11
Nov 4th, 2009
Originally Posted by Atli View Post
Yes, it is a security measure, limiting the window for a session hijacking.

There are ways for malicious persons to obtain your session cookie, which gives them the ability to hijack an open session. The less time the session is left idle, the less time the hijackers have to hijack it.
Not exactly bullet proof, but in cases like these our options are kind of limited.

Aside from that, this is also just a matter of clearing up the unused session data laying around on the server. Session are only meant to be temporary storage, lasting a single "session". If you leave for an extended period, once you return and resume what you were doing, that would be considered a new session. How long that period is, that is up to you.
i dont think i set a session cookie ... unless every session made has a cookie
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 455
Reputation: Atli is on a distinguished road 
Solved Threads: 56
Atli's Avatar
Atli Atli is offline Offline
Posting Pro in Training
 
0
  #12
Nov 4th, 2009
PHP uses cookies by default. If you don't know whether or not u use cookies to transfer the session ID, you almost definitely do.

Doesn't really matter in this context tho. The other option; using the query string, is no more secure. Less so, if anything.
Please do not ask for help in a PM. Use the forums.
And use [code] tags!
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 455
Reputation: Atli is on a distinguished road 
Solved Threads: 56
Atli's Avatar
Atli Atli is offline Offline
Posting Pro in Training
 
0
  #13
Nov 4th, 2009
Duplicate... The forum software is on the fritz xD
Last edited by Atli; Nov 4th, 2009 at 4:05 am.
Please do not ask for help in a PM. Use the forums.
And use [code] tags!
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 290
Reputation: SKANK!!!!! is an unknown quantity at this point 
Solved Threads: 2
SKANK!!!!!'s Avatar
SKANK!!!!! SKANK!!!!! is offline Offline
Posting Whiz in Training
 
0
  #14
Nov 4th, 2009
thanks i have no more questions u answered them all!
Reply With Quote Quick reply to this message  
Reply


Message:




Views: 758 | Replies: 13
Thread Tools Search this Thread



Tag cloud for destroy, gc_maxlifetime, question, sessions, unset
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC