For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > December 2006 > #39748 [Asn->Csd]: session is reset when you open it from another browser









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author #39748 [Asn->Csd]: session is reset when you open it from another browser
str at strgt dot cjb dot net

2006-12-11, 7:02 pm

ID: 39748
User updated by: str at strgt dot cjb dot net
Reported By: str at strgt dot cjb dot net
-Status: Assigned
+Status: Closed
Bug Type: Documentation problem
Operating System: Debian GNU/Linux
PHP Version: 5.2.0
Assigned To: theseer
New Comment:

I changed the PHP implementation (was using the PHP package from
dotdeb, now I have PHP package from debian-testing) and now it
works.... sorry


Previous Comments:
------------------------------------------------------------------------

[2006-12-06 14:15:57] str at strgt dot cjb dot net

@theseer: is it really a documentation issue?

I test the same code in other PHP versions, and it worked fine. The
session is not erased.

------------------------------------------------------------------------

[2006-12-06 11:13:38] theseer@php.net

This is expected behaviour and not a bug in php. Setting the session-id
manually assumes that there is no such session, thus destroying any
session data already existing under the given ID.

Reassigning this as a documentation issue.


------------------------------------------------------------------------

[2006-12-05 21:34:19] str at strgt dot cjb dot net

I checked in 2 servers with the same PHP version and got the same error

------------------------------------------------------------------------

[2006-12-05 20:47:01] joey@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.

As you were told in IRC, this is not a PHP bug.

------------------------------------------------------------------------

[2006-12-05 20:39:59] str at strgt dot cjb dot net

Description:
------------
I open a session in browserA and get session_id() = X;... I set some
vars to $_SESSION and then go to browserB where I get session_id() = Y.
If i try to set the session_id(X) in browserB, the session is destroyed
and I cannot see the session from browserA or browserB.

You can test the code in
http://develsystems.com/sessionTest.php
http://develsystems.com/sessionTest.phps

And see the phpinfo in

http://develsystems.com/phpinfo.php

Reproduce code:
---------------
<?php
if ($_GET['SES']) {
session_id($_GET['SES']);
}

session_start();

echo session_id();

if (isset($_GET['a'])) {
$_SESSION['a'] = $_GET['a'];
}


echo '<pre>'; var_dump($_SESSION);

Expected result:
----------------
It should open the session from browserA in browserB and not destroy
it.



------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=39748&edit=1
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com