[nycphp-talk] Session cookie expiration issue
Mark Armendariz
enolists at gmail.com
Wed Mar 8 19:34:07 EST 2006
Have you tried plain sessions sans adodb? If not, you might want to check
to be sure sessions are working properly on your php setup before you put
too much time digging into the library.
Check out your phpinfo().
Look for session.gc_maxlifetime.
It defaults at 1440 (in seconds = 24 minutes)
>From the manual:
"session.gc_maxlifetime specifies the number of seconds after which data
will be seen as 'garbage' and cleaned up.
Note: If different scripts have different values of session.gc_maxlifetime
but share the same place for storing the session data then the script with
the minimum value will be cleaning the data. In this case, use this
directive together with session.save_path.
Note: If you are using the default file-based session handler, your
filesystem must keep track of access times (atime). Windows FAT does not so
you will have to come up with another way to handle garbage collecting your
session if you are stuck with a FAT filesystem or any other filesystem where
atime tracking is not available. Since PHP 4.2.3 it has used mtime (modified
date) instead of atime. So, you won't have problems with filesystems where
atime tracking is not available. "
Considering that, you may also want to consider checking the differnece
between the time on your server and the time on your mysql server (if
they're separate).
Also
session.cookie_lifetime integer
"session.cookie_lifetime specifies the lifetime of the cookie in seconds
which is sent to the browser. The value 0 means "until the browser is
closed." Defaults to 0. See also session_get_cookie_params() and
session_set_cookie_params(). "
If these are off, you'll want to update your php.ini. If you've no control
over it, check out:
http://www.nyphp.org/phundamentals/ini.php
Let us know what you find out!!
Mark Armendariz
More information about the talk
mailing list