php session expire

Status
Not open for further replies.

funkymunky20079

New Member
Messages
3
Reaction score
0
Points
0
I've been noticing that my PHP sessions are expiring after rather a short time. I tried to see what the default timeout settings was but access to php_info() wasn't allowed so I'm wondering how I can extend the session life (say to 24hours?). Can I have a local php.ini file? If so, how would I change the default settings?

Another option would be to use the ini_set() function I suppose? I know how to change the default this way, but I'd also need to define a custom path for session.save_path wouldn't I?

Thanks in advance!
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
session configuration is whatever PHP has per default.
If you would like to have "sessions" that last longer than this, you should make use of cookies to store user information, such as a session id that relates to a database table.

PHP settings are server-wide and cannot be changed on a per-account basis. You cannot have your own php.ini, but you could make use of ini_set().
 
Status
Not open for further replies.
Top