This is an old revision of the document!
PHP RFC: Add session_gc()
- Version: 1.0
- Create Date: 2014-03-13
- Modify Date: 2016-08-10
- Author: Yasuo Ohgaki, firstname.lastname@example.org
- Status: Voting
- First Published at: http://wiki.php.net/rfc/session-gc
Current session GC depends on probability. Thus, low traffic sites would not delete expired session data and could be usable as valid session. Traffic varies day and night time for high traffic sites. Chances are high that expired session may not be deleted as it should.
The best way to purge old session data is executing GC periodically.
Although timestamp based session management is declined twice, it is mandatory for session management. Please refer to Strict Session RFC for details.
- Add session_gc() API.
- Document calling session_gc() periodically is the best practice.
It simply executes GC save handler defined.
Backward Incompatible Changes
Proposed PHP Version(s)
This project requires a 2/3 majority. Vote starts: 2016/08/10 - Vote ends: 2016/08/17 23:59:59 UTC
Patches and Tests
After the project is implemented, this section should contain
- the version(s) it was merged to
- PHP-7.1 and master branch
- a link to the git commit(s)
- a link to the PHP manual entry for the feature