title: Session Start Failure
body: <p>This is not your average session failed to start question, there is no whitespace, i have not called it in another file etc.</p>
  
  <p>Im currently working on an application as I have started to build my session library, now when I call <code>session_start</code> I get the following error:</p>
  
  <blockquote>
    <p>A session had already been started - ignoring <code>session_start()</code></p>
  </blockquote>
  
  <p>For those who wish to see the source: <a href="https://github.com/AdminSpot/ASFramework/blob/master/system/libraries/session.php" rel="nofollow noreferrer">https://github.com/AdminSpot/ASFramework/blob/master/system/libraries/session.php</a></p>
  
  <p>This usually means that the session.autostart directive is set to <code>1</code>, but that's the thing.. it's not, it's set to 0 and I have verified this by doing the following:</p>
  
  <ul>
  <li>Search my entire system for <code>php.ini*</code> files, checked them</li>
  <li>Executed the following command <code>php --ini</code> amd validated the ini files</li>
  <li>executed the following command <code>php -i | grep session.auto_start</code>. which responded with <code>session.auto_start =&gt; Off =&gt; Off</code></li>
  <li>Checked the PHPInfo page, see image below</li>
  <li>Checked the php.ini files for cgi</li>
  <li>There is no htaccess files on nginx</li>
  <li><code>grep -lir "session_start" *</code> only shows my library file</li>
  <li>Restarting FastCGI, Nginx and the entire server</li>
  </ul>
  
  <p>I have created a basic test script to test where i have just called session start on it's own.</p>
  
  <p>The <code>phpinfo()</code> call stats the active php.ini is <code>/etc/php5/cgi/php.ini</code> so after running <code>cat /etc/php5/cgi/php.ini | grep session.auto_start</code> I get <code>session.auto_start = 0</code>, so it disabled, Could it be NGinx ?</p>
  
  <p>Has anyone got any idea what's going on, some server information below:</p>
  
  <ul>
  <li>PHP: PHP 5.3.5-1ubuntu7.2 with Suhosin-Patch</li>
  <li>MySQL: Ver 14.14 Distrib 5.1.54, for debian-linux-gnu (i686) using readline 6.2</li>
  <li>Nginx: Version: nginx/0.8.54</li>
  </ul>
  
  <p>PHPInfo screen:</p>
  
  <p><img src="https://i.stack.imgur.com/pRySy.png" alt="enter image description here"></p>