Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6106911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:07:50+00:00 2026-05-23T14:07:50+00:00

This is not your average session failed to start question, there is no whitespace,

  • 0

This is not your average session failed to start question, there is no whitespace, i have not called it in another file etc.

Im currently working on an application as I have started to build my session library, now when I call session_start I get the following error:

A session had already been started – ignoring session_start()

For those who wish to see the source: https://github.com/AdminSpot/ASFramework/blob/master/system/libraries/session.php

This usually means that the session.autostart directive is set to 1, but that’s the thing.. it’s not, it’s set to 0 and I have verified this by doing the following:

  • Search my entire system for php.ini* files, checked them
  • Executed the following command php --ini amd validated the ini files
  • executed the following command php -i | grep session.auto_start. which responded with session.auto_start => Off => Off
  • Checked the PHPInfo page, see image below
  • Checked the php.ini files for cgi
  • There is no htaccess files on nginx
  • grep -lir "session_start" * only shows my library file
  • Restarting FastCGI, Nginx and the entire server

I have created a basic test script to test where i have just called session start on it’s own.

The phpinfo() call stats the active php.ini is /etc/php5/cgi/php.ini so after running cat /etc/php5/cgi/php.ini | grep session.auto_start I get session.auto_start = 0, so it disabled, Could it be NGinx ?

Has anyone got any idea what’s going on, some server information below:

  • PHP: PHP 5.3.5-1ubuntu7.2 with Suhosin-Patch
  • MySQL: Ver 14.14 Distrib 5.1.54, for debian-linux-gnu (i686) using readline 6.2
  • Nginx: Version: nginx/0.8.54

PHPInfo screen:

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:07:50+00:00Added an answer on May 23, 2026 at 2:07 pm

    My first guess would be that you have an auto-prepend file or an .htaccess which is modifying the settings in the meanwhile.

    You can use ini_get to retrieve the value of session.auto_start and auto_prepend_file to confirm. phpinfo() should work too.

    Edit

    Could it be that your session library is being instantiated twice? Since return $this->session_started is an instance variable, that could cause issues. What happens if you set that to a class-level variable?

    Side note:
    You also have this return $this->session_started = true; at the end of the start() method. It shouldn’t matter, but it looks funny.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So, this is not your average 'conditional sort by' question... I have a rather
This is not your average My ScrollViewer isn't working question... Assume a window with
This one is a case of not doing your homework.:-) Apart from dynamic loading
Sorry for this not being a real question, but Sometime back i remember seeing
I ask this not to start anything negative. Rather, after looking at ASP.NET MVC
Under what circumstances would this or would this not be safe? I have a
I have done a fair amount of reading on this and I am not
This question is not for the faint of heart and will be time consuming..
Why is this not working? $data = What is the STATUS of your mind
why is this not ok? aContract = function(){}; aContract.prototype = { someFunction: function() {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.