|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60101 Limit to session_regenerate_id updates
Submitted: 2011-10-19 22:54 UTC Modified: 2013-02-18 00:35 UTC
From: funkychunkymunky at gmail dot com Assigned:
Status: No Feedback Package: Session related
PHP Version: 5.3.8 OS: Debian Squeeze
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
33 - 10 = ?
Subscribe to this entry?

 [2011-10-19 22:54 UTC] funkychunkymunky at gmail dot com
Was doing some debugging on our session class and wanted to start from scratch on 
a few tests so we came up with the following, just to see how frequently we his 
collisions using the default session configs.

It appears that session_regenerate_id quits regenerating after 114 runs, after 
which the function simply fails.

Test script:
$arr = array();

for( $i = 0; $i <= 100000; $i++ )
        $ses = session_id();
if(!session_regenerate_id(true) ) {
        echo "Session: ". $ses. "\n";
print_r( array_count_values( $arr ) );

Expected result:
Every call to session_regenerate_id and then to session_id would result in a new 
ID, and without limit.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-23 03:19 UTC]
-Status: Open +Status: Feedback
 [2011-11-23 03:19 UTC]
I've test with my PHP 5.3 and trunk (with strict session patch) with cli. 
Although, I had to add ob_start() at the beginning, it executes all.

I guess you are using Apache web server to test it. Is there any crash log in 
your apache's error_log? If so, please submit backtrace.
 [2013-02-18 00:35 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 12:01:28 2024 UTC