#22054 [Opn->Bgs]: Starting session from specified ID fails
| From: | sniper@php.net | Date: | Thu, 13 Feb 2003 08:18:17 +0000 |
| Subject: | #22054 [Opn->Bgs]: Starting session from specified ID fails | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-32989@lists.php.net to get a copy of this message | ||
ID: 22054
Updated by: sniper@php.net
Reported By: tboardma@indiana.edu
-Status: Open
+Status: Bogus
Bug Type: Session related
Operating System: Windows 2000
PHP Version: 4.3.0
New Comment:
There's not much point in setting the session.auto_start
off in a script since at that time, the session is already
started.
Previous Comments:
------------------------------------------------------------------------
[2003-02-04 13:55:48] tboardma@indiana.edu
Running
SERVER_SOFTWARE Microsoft-IIS/5.0
Server API ISAPI
------------------------------------------------------------------------
[2003-02-04 13:04:10] tboardma@indiana.edu
I have a script that saves information to a session
variable and then sends the session_id to another script
via POST, which does something, then sends data to another
PHP script by silent POST, including the session_id, which
is to retrieve the original values saved in the session,
specified by it's original session_id.
1st PHP script:
$USER_FORM = "a bunch of text";
session_register("USER_FORM");
$sess = session_id();
exit;
2nd PHP script:
/* We want to start our session from a session id that is
passed
to us in POST data */
$sess = $HTTP_POST_VARS['sess'};
ini_set("session.auto_start", "0");
ini_set("session.cache_limiter", "public");
session_id($sess);
session_start();
global $USER_FORM;
/* Instead of printint the "bunch of text", it prints
nothing */
print $USER_FORM;
This same code worked using PHP 4.0.6 running on UNIX.
In my php.ini, I have session_auto_start set to true, which
is why I turn it off by setting the ini in the 2nd script.
Register globals is on.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22054&edit=1