In one my environments, I have a page which sets a session variable, then redirects to another, similar to below:
ScriptA.php
session_start();
$_SESSION['foo'] = 'bar';
header("redirect: ScriptB.php");
die()
ScriptB.php
session_start();
header("HTTP/1.0 403 Forbidden");
echo $_SESSION['foo']; //will print nothing
unset($_SESSION['foo']);
If I comment our the header line in ScriptB.php, it WILL print the value. Very strange.
Any ideas? I have never seen this behavior before.
Note: This is a Win 2008 Server, Running IIS 7, and PHP 5.3