title: IE Not Passing PHP Session Variables
body: <p>I'm trying to use session variables across several pages. However, the variables disappear when I go from the original page they are set on, to another page on my server. I've confirmed the variables are set originally on the first page but when I try to access them on a subsequent page they have no value. If I access the <code>session_id()</code> it is different than the one I set on the first page.</p>
  
  <p>Here's a simplified version of what I am trying to do:
  (First page where the session variables are set)</p>
  
  <pre><code>&lt;?php
  ini_set("display_errors", "1");
  error_reporting(E_ALL); 
  session_start();
  $_SESSION['id'] = session_id();
  header('Location: pagetwo.php');
  die();
  ?&gt;
  </code></pre>
  
  <p>(Second page where I try to access the session variables)</p>
  
  <pre><code>&lt;?php
  ini_set("display_errors", "1");
  error_reporting(E_ALL); 
  session_start();
  echo "SESSION[id] = ".$_SESSION['id']."&lt;br&gt;";
  ?&gt;
  </code></pre>
  
  <p><code>$_SESSION['id']</code> returns blank and I have an output error stating:</p>
  
  <blockquote>
    <p>Notice: Undefined index: id in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\pagetwo.php on line 5</p>
  </blockquote>
  
  <p>Now here is where things get a little weird. This does not happen in all browsers (only IE8 and Firefox 3). I am able to access the session variables in Chrome 15 and Firefox 7. Also, I have two different servers running Apache and PHP. The server where I am having these issues runs PHP 5.2.17, however, with my other server running PHP 5.2.9 I can access the session variables across all pages in all browser types.</p>
  
  <p>It would seem like the PHP.ini files would be different between the two servers, however, they session settings are identical between them. </p>
  
  <p>I'm not sure if someone else has run into a similar issue where IE8 could not access session variables in PHP 5.2.17 but I have searched the forms for the past two days and could not find anything else like this. I'm hoping I'm just missing something very simple and someone can point me in the right direction.</p>