Bug #74985 [Opn]: Session timeout limited to 1440 seconds!

From: Date: Sat, 12 Aug 2017 14:45:03 +0000
Subject: Bug #74985 [Opn]: Session timeout limited to 1440 seconds!
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-210633@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74985&edit=1

 ID:                 74985
 Updated by:         ajf@php.net
 Reported by:        matthew at slyman dot org
 Summary:            Session timeout limited to 1440 seconds!
 Status:             Open
 Type:               Bug
 Package:            *General Issues
 PHP Version:        7.1.7
 Block user comment: N
 Private report:     N

 New Comment:

Have you tried changing the INI file directly, rather than at runtime?


Previous Comments:
------------------------------------------------------------------------
[2017-07-25 06:38:31] matthew at slyman dot org

Description:
------------
With the following session configuration, I get the desired 2 hour sessions in PHP7.0 — but in
PHP7.1, sessions seem to be limited to a much shorter time, e.g. 900–1440 seconds, despite my
attempt to reconfigure this: PHP7.1 seems to be ignoring my instructions about how long sessions
should last for! I realise that session garbage collection has been changed. Is there a bug in PHP,
or have I forgotten to configure something in the new system?

Test script:
---------------
\ini_set('session.use_only_cookies',1);
\ini_set('session.use_strict_mode',1);		\ini_set('session.gc_maxlifetime',7200);//2
hour sessions
\ini_set('session.cookie_httponly',1);
\ini_set('session.cookie_secure',1);
\ini_set('session.cookie_lifetime',0);
\ini_set('session.hash_function','sha256');//Does nothing in PHP7.1
\ini_set('session.hash_bits_per_character','4');//Does nothing in PHP7.1
\ini_set('session.sid_length',64);//PHP7.1
\ini_set('session.sid_bits_per_character',4);//PHP7.1
\session_start();


Expected result:
----------------
Sessions should last for 2 hours (7200s).

Actual result:
--------------
Sessions last for ≤1440 seconds before garbage collection occurs, which logs out users before
they can complete certain actions, e.g. completing extended psychometric profile questionnaires
(large HTML forms).


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=74985&edit=1


Thread (6 messages)

« previous php.bugs (#210633) next »