|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #29262 [session feature] make session_id() possible to called after session_start()
Submitted: 2004-07-19 16:52 UTC Modified: 2021-08-01 04:22 UTC
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: xuefer at 21cn dot com Assigned: cmb (profile)
Status: No Feedback Package: Session related
PHP Version: 4.3.8 OS: xp
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: xuefer at 21cn dot com
New email:
PHP Version: OS:


 [2004-07-19 16:52 UTC] xuefer at 21cn dot com
current limitation:
session_id() needs to be called before session_start() for that purpose(change sid)

but session_regenerate_id() can be called AFTER session_start();

so why not make session_id($sid) the same way?
session_id($sid) use old scheme before session_start(); (BC)
and do update SID/send cookie after session_start() (new feature)

the reason to do this is: i'd have same userid use same session, the new one will search for old sessionid (which is better done in session read callback), and session_id($oldsid)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-02 14:37 UTC]
-Package: Feature/Change Request +Package: Session related
 [2021-07-21 15:13 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-07-21 15:13 UTC]
Is this still relevant for anyone?
 [2021-08-01 04:22 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 "Re-Opened". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 27 13:01:31 2024 UTC