title: PHP Session_status() == PHP_SESSION_NONE Sometimes Showing Session Not Started
body: <p>I have had a good search on Google and on StackOverflow to see if anyone else has experienced this and I can't seem to find an answer.</p>
  
  <p>Basically I'm in the late stages of developing my website on a local server and I've got one bug that I can't seem to squash.</p>
  
  <p>Every so often when I load one of the pages I get a SESSION NOT STARTED message which comes from:</p>
  
  <pre><code>if (session_status() == PHP_SESSION_NONE) { die('SESSION NOT STARTED');
  }//SESSION NEEDS TO START TO CHECK USERS
  </code></pre>
  
  <p>This is located in header.php, which is called on index.php after the body opens. (Just in-case the session doesn't start or I forget and errors get chucked everywhere.)</p>
  
  <p>Right at the top of index.php (and every other page) session_start(); opens the session, so the session has definitely started... as so;</p>
  
  <pre><code>&lt;?php
  error_reporting(E_ALL);
  ini_set('display_errors', '1');
  //Connect MYSQL
  include 'mysql_conn.php';
  include 'functions.php';
  //START SESSION
  session_start();
  </code></pre>
  
  <p>The message disappears if you refresh the page and I can't seem to re-create it by clearing cache / restarting browser / using private browsing or anything like that.</p>
  
  <p>I was thinking maybe its setting it off when a "new" session is started maybe, unless I'm just doing it wrong?
  Its so rare that its hard to pinpoint what exactly is causing this.</p>
  
  <p>Or should session_status be called before any form of output?</p>
  
  <p>Thanks, any help appreciated</p>
  
  <p>Edit: Running PHP 5.6.28</p>