scss wrote:
> 
>> That is a tough one if you are using files.  PHP's garbage collector will
>> run on a specific interval looking for files that have old timestamps
>> (outside of a specificed range), and once it finds them, it will delete
>> them.
>>
>> If you wanted to iterate the session's file directory, you can get the
>> last
>> modification or last access time of the files (whichever is available)
>> and
>> you might get some information for when the last time the session was
>> active.  You'd also have to actually open the files and unserialize the
>> data
>> in order to determine who that session file belongs to.
>>
>> Your other option is to put sessions in the database, that might give you
>> a
>> bit more flexibility to do this kind of introspection at the application
>> level.
>>
> 
> I thought that some variables might be in the session such as idle time,
> session generated time, expiry time etc. That was why I asked that.
> I dumped the $_SESSION but there was not anything other than my user data
> and the standard hash elements of the login form.
> Why I wanted to see the expiry time was for testing if the session is
> valid
> till the time I set for expiry.
> I may switch session handler to database as you suggest. How about
> performance? Any decrease?
> 

This is kind of pointless unless you're trying to find the session expiry
for a different user. If you're wanting to show the session expiry time for
the currently logged in user, it will always be the current time + session
lifetime. Session generation time is not stored anywhere, so you'll need to
specifically store it somewhere (i.e. in the session or db). Just be careful
if you're planning on having the session id change on a regular basis, as it
will limit the ways you can store/look up this info.

Cheers,
David
-- 
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/remember-me-and-session-cookies-tp2282438p2283049.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to