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

From: Date: Tue, 25 Jul 2017 06:38:40 +0000
Subject: Bug #74985 [NEW]: Session timeout limited to 1440 seconds!
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-210316@lists.php.net to get a copy of this message
From:             matthew at slyman dot org
Operating system: 
PHP version:      7.1.7
Package:          *General Issues
Bug Type:         Bug
Bug description:Session timeout limited to 1440 seconds!

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 bug report at https://bugs.php.net/bug.php?id=74985&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=74985&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=74985&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=74985&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=74985&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=74985&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=74985&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=74985&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=74985&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=74985&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=74985&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=74985&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=74985&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=74985&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74985&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=74985&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=74985&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=74985&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74985&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=74985&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=74985&r=mysqlcfg



Thread (6 messages)

« previous php.bugs (#210316) next »