title: PHP Session variable is empty after redirecting to another page
body: <p>I'm creating a <code>PHP</code> session, username and all, but when I redirect with header(<code>foo.php</code>), the <code>$_SESSION</code> variable appears empty, even though before redirecting it appears properly filled when checking with var_dump.</p>
  
  <p>First I create the session:</p>
  
  <pre><code>   $_SESSION['loggedin'] = true;
     $_SESSION['username'] = $username;
     $_SESSION['start'] = time();
      $_SESSION['expire'] = $_SESSION['start'] + (5 * 60);
     echo "Bienvenido! " . $_SESSION['username'];
  
     header('location:login-success.php');
     exit();
  </code></pre>
  
  <p>On the next page I start session on top of the page, no HTML above, no nothing:</p>
  
  <pre><code>&lt;?php
      session_start();
      if(!isset($_SESSION['username'])){
          echo "nope";
      }
  ?&gt;
  </code></pre>
  
  <p>The output is always "nope". I've tried on my localhost and on a remote host, several browsers, cookies are enabled. $_SESSION appears empty when checking with var_dump now.</p>