This is an old revision of the document!
PHP RFC: Your Title Here
- Version: 0.9
- Create Date: 2014-03-13
- Modify Date: 2014-03-13
- Author: Yasuo Ohgaki, firstname.lastname@example.org
- Status: Draft
- 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.
Option 1 - Let user call GC
- Add session_gc() API.
- Document calling session_gc() periodically is the best practice.
Option 2 - Change save handler
- Let save handlers to check last GC time.
- If last GC time is over session.expire, then execute GC.
Backward Incompatible Changes
Proposed PHP Version(s)
Impact to Existing Extensions
- Option 1 : Session module have new API (session_gc())
- Option 2 : Session save handlers including 3rd party modules.
No INI changes
If there are any php.ini settings then list:
- hardcoded default values
- php.ini-development values
- php.ini-production values
Unaffected PHP Functionality
Removing probability based GC.
Proposed Voting Choices
VOTE: 2014/XX/XX - 2014/XX/XX
State whether this project requires a 2/3 or 50%+1 majority (see voting)
Patches and Tests
After the project is implemented, this section should contain
- the version(s) it was merged to
- a link to the git commit(s)
- a link to the PHP manual entry for the feature
Links to external references, discussions or RFCs
Keep this updated with features that were discussed on the mail lists.