php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41360 always generate new SID
Submitted: 2007-05-10 21:29 UTC Modified: 2007-05-10 21:31 UTC
From: barton dot tomas at gmail dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 5.2.2 OS: windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: barton dot tomas at gmail dot com
New email:
PHP Version: OS:

 

 [2007-05-10 21:29 UTC] barton dot tomas at gmail dot com
Description:
------------
After calling session_start() generates two session files, $_SESSION variable is strored in which SID is forgotten. 

Reproduce code:
---------------
<?php 
session_start();
echo 'SID:'.session_id();

 $_SESSION['a'] = 3;?>
<p>look on <a href="another_page.php">next</a></p>

another_page.php
---
<?php 
session_start();
if (isset($_SESSION['a'])){
	echo 'Session var a = ',$_SESSION['a'].'<br />';
}else { 
echo 'Session is not registered.<br />';}
echo 'SID:'.session_id(); ?>

Expected result:
----------------
SID:gahug37g6ga2e4qjuoo8988d62
look on next

----
Session is not registered.
SID:5elroalaf46hc4muhle5c18896


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-05-10 21:31 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Your browser does not accept session cookie.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 20:01:31 2024 UTC