title: Problem with PHP session in Xampp
body: <p>At it's simplest, if file_1.php contains  </p>
  
  <pre><code>&lt;?php
  
    session_start(); 
  
    $_SESSION["test_message"] = "Hello, world";
  
    header("Location: http://localhost/file_2.php");
  ?&gt;
  </code></pre>
  
  <p>and file_2.php contains  </p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;?php
  
    if (!(isset($_SESSION["test_message"])))
      echo "Test message is not set";
    else
      echo $_SESSION["test_message"];
  
  var_dump($_SESSION);
  
    session_destroy();
  ?&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>the result is <code>Test message is not set</code> and a var_dump($_SESSION) returns <code>null</code> - <code>locally, with Xampp</code>. However, if I upload those same files to a paid-for hosted web site, it works and I see  </p>
  
  <pre><code>Hello, world
  array
    'test_message' =&gt; string 'Hello, world' (length=12)
  </code></pre>
  
  <p>When I look at PHPinfo under Xampp it shows <code>Session Support  enabled</code>.  What am I doing wrong?</p>