Forum Moderators: coopster

Message Too Old, No Replies

how to increase the length of a session to perhaps several hrs

         

irock

8:00 am on Jul 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you guys know how to increase the length of a session to perhaps several hrs? I need to save this data for a longer period of time.

The default session length is 15 minutes. But the thing I don't understand is why session_cache_expire(); returns 180 minutes?

Thanks for your help!

jatar_k

4:19 pm on Jul 31, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Have you tried the settings in php.ini?

session.gc_maxlifetime [ca2.php.net]

sorry, this slipped by. :)

irock

3:34 am on Aug 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks! Do I have to recomplied PHP to adjust this session.gc_maxlifetime setting?

DrDoc

8:22 am on Aug 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



session.gc_maxlifetime is PHP_INI_ALL


Table 2. Definition of PHP_INI_* constants

PHP_INI_USER = Entry can be set in user scripts
PHP_INI_PERDIR = Entry can be set in php.ini, .htaccess or httpd.conf
PHP_INI_SYSTEM = Entry can be set in php.ini or httpd.conf
PHP_INI_ALL = Entry can be set anywhere

irock

6:25 pm on Aug 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sorry DrDoc, but where can I find this PHP_INI_ALL file? Could you give more instructions?

Thanks again...