From: [EMAIL PROTECTED] Operating system: Windows 2000 PHP version: 4.3.0 PHP Bug Type: Session related Bug description: Starting session from specified ID fails
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 bug report at http://bugs.php.net/?id=22054&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22054&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22054&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22054&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22054&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22054&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22054&r=support Expected behavior: http://bugs.php.net/fix.php?id=22054&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22054&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22054&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22054&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22054&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22054&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22054&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22054&r=gnused