Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When I run my site locally, through xampp, I get no errors and all is well. Once it gets on the apache server I get the error message in the title. Here is my session start:

if(session_status() == PHP_SESSION_NONE) { session_start(); }

I have tried if(session_status() != 2) { session_start(); } and it doesn't work either.

The only thing I have gotten to allow the page to load is: if (!$_SESSION) {session_start();} However, I get a session_start() error at the top every page telling me that my login is trying to create a new session when there already is one. What could be the problem? I checked the php.ini file and nothing seemed out of the ordinary, though I am not very familiar with it.

share|improve this question
What is the php version that you are using? session_status is introduced in PHP 5.4 –  ZVIK Oct 15 '13 at 12:50
the server info on the left side says 5.2.17, but the provider assures me that it's newer than that. How can I manually upgrade it? The environment is cpanel and I cannot find concrete resources on exactly how to do it. –  user2690363 Oct 15 '13 at 13:03
i cant help you since i am not much into cpanel. Its better to go back to your vendor rather than creating a mess. –  ZVIK Oct 15 '13 at 13:09

1 Answer 1

The problem is with the php server version. session_status() is only for php versions >= 5.4.0.

If server info says 5.2.17, the provider must have lied about it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.