php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47060 gc_maxlifetime not run
Submitted: 2009-01-10 05:36 UTC Modified: 2012-03-31 03:54 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: bbogdan at easylinks dot ro Assigned: yohgaki (profile)
Status: Closed Package: Session related
PHP Version: 5.2.8 OS: win32 only - Windows XP SP 3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bbogdan at easylinks dot ro
New email:
PHP Version: OS:

 

 [2009-01-10 05:36 UTC] bbogdan at easylinks dot ro
Description:
------------
A session is not deleted after cookie_lifetime expires and gc run if expiration date is modified in user stored cookie.

Reproduce code:
---------------
ini_set('session.cookie_lifetime', 10);
ini_set('session.gc_maxlifetime', 5);
ini_set('session.gc_divisor', 1);

session_start();
if ( isset($_SESSION['a']) ) {
    echo 'is set';
} else {
    echo 'is not set';
    $_SESSION['a'] = true;
}

Expected result:
----------------
If i manualy modify the cookie to have a longer lifetime (2-3 mins) and rerun the script after 20 seconds i expect the session to be deleted by gc. (works as expected on linux)

Actual result:
--------------
The cookie persists after 10 seconds if you modify the stored cookie lifetime.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-21 09:22 UTC] dypa at bk dot ru
5.2.9-2 Windows NT DYPA 5.1 build 2600

Reproduced

ini_set('session.cookie_lifetime', 10);
ini_set('session.gc_maxlifetime', 5);
ini_set('session.gc_divisor', 1);
+
[Session]
session.save_handler = files
;session.save_path = "/tmp"
session.use_cookies = 1
;session.cookie_secure =
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor     = 100
session.gc_maxlifetime = 1440
session.bug_compat_42 = 1
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
;session.entropy_length = 16
;session.entropy_file = /dev/urandom
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 4
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="
 [2012-03-31 03:54 UTC] yohgaki@php.net
Duplicate of #55333
 [2012-03-31 03:54 UTC] yohgaki@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: yohgaki
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 22:01:28 2024 UTC