|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-01-12 11:03 UTC] yunosh@php.net
Description:
------------
Looks like the GC settings don't work properly, or GC doesn't work at all on 7.1.0-dev.
Test script:
---------------
ini_set('session.gc_probability', 100);
ini_set('session.gc_divisor', 1);
ini_set('session.gc_maxlifetime', -1);
session_name('sessionname');
@session_start();
Expected result:
----------------
All sessions should be GC'ed
Actual result:
--------------
They aren't.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 22:00:01 2025 UTC |
I don't see problem with current PHP-7.0/7.1 branches. Are you sure your system is using other save handlers like memcache, etc? Use following script. You should see undefined var error always if PHP is working correctly. <?php error_reporting(-1); ini_set('session.save_handler', 'files'); ini_set('session.save_path','/tmp'); ini_set('session.gc_probability', 1); ini_set('session.gc_divisor', 1); ini_set('session.gc_maxlifetime', -1); session_name('sessionname'); var_dump(session_start()); $_SESSION['cnt']++;