ID:               47060
 Comment by:       dypa at bk dot ru
 Reported By:      bbogdan at easylinks dot ro
 Status:           Open
 Bug Type:         Session related
 Operating System: win32 only - Windows XP SP 3
 PHP Version:      5.2.8
 New Comment:

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="


Previous Comments:
------------------------------------------------------------------------

[2009-01-10 05:36:47] 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.


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


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

Reply via email to