Bug #71349 [Fbk->Csd]: Garbage collection not running
| From: | yunosh@php.net | Date: | Tue, 30 Aug 2016 10:19:11 +0000 |
| Subject: | Bug #71349 [Fbk->Csd]: Garbage collection not running | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-203674@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71349&edit=1
ID: 71349
Updated by: yunosh@php.net
Reported by: yunosh@php.net
Summary: Garbage collection not running
-Status: Feedback
+Status: Closed
Type: Bug
Package: Session related
Operating System: Linux
PHP Version: master-Git-2016-01-12 (Git)
-Assigned To:
+Assigned To: yunosh
Block user comment: N
Private report: N
New Comment:
Looks like this has been fixed in the meantime.
Previous Comments:
------------------------------------------------------------------------
[2016-08-27 06:30:09] yohgaki@php.net
Are you sure your system is NOT using other save handlers like memcache, etc?
------------------------------------------------------------------------
[2016-08-27 06:29:31] yohgaki@php.net
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']++;
------------------------------------------------------------------------
[2016-01-13 12:26:40] yunosh@php.net
Looks like this just started on PHP 7.0-dev too.
Maybe due to one of those?
https://github.com/php/php-src/commit/63c77ee4b12f8489f50add87af4371d9511b0295
https://github.com/php/php-src/commit/a15e9ccba8a34553c029fb4574edba87c76447e5
------------------------------------------------------------------------
[2016-01-12 12:00:29] yunosh@php.net
Test with unit tests:
$ sudo pear -d auto_discover=1 install -o -f channel://pear.horde.org/Horde_SessionHandler
channel://pear.horde.org/Horde_Db channel://pear.horde.org/Horde_Test
$ php $(pear config-get test_dir)/Horde_SessionHandler/Horde/SessionHandler/AllTests.php
------------------------------------------------------------------------
[2016-01-12 11:03:48] 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.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71349&edit=1