title: PHP $_SESSION not working as expected
body: <p>I have a PHP website I'm maintaining and I've confirmed that this worked at one point.</p>
  
  <p>We have a website utilizing a login system which stores a logged in user's information in a <code>$_SESSION['user']</code> variable. The site used to log out the user when clicking <em>/logout.php</em> which essentially removed that portion of the session, then <code>header()</code> redirected to the homepage.</p>
  
  <p>As of recently, the <em>/logout.php</em> file with <code>session_start()</code> at the top somehow doesn't see the session information when <code>print_r()</code> is used to output it for debugging purposes.</p>
  
  <p>If I go to another page, I see the session info just fine, but not on the logout page...which is exactly why I cannot remove the session info, because it's not accessible.</p>
  
  <p>I thought <code>$_SESSION</code> was global on the site until the browser was closed. I've never had this happen and I know the session instance was started on this page, so it's weird that it's not showing me the session data.</p>
  
  <p>Any ideas? I'm totally stumped on this one!</p>
  
  <p>Code: /logout.php</p>
  
  <pre><code>&lt;?
  #session_start() is inside this file
  require_once($_SERVER['DOCUMENT_ROOT'].'/includes/config.php');
  
  unset($_SESSION['user']);
  header("location: /");
  exit();
  ?&gt;
  </code></pre>
  
  <p>The checking of <code>$_SESSION['user']</code> is site-wide and I call to various items below it when needed for different things. Someone else built this site and I'm trying to debug why it's not working for them all of a sudden.</p>