NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
session_start


Joined: 09 Feb 2010
Posts: 8
Reply with quote
The following code is all that is in the file atest.php:

Code:
if (!$Session_ID=session_id())
{ session_start();
  session_cache_limiter('none'); 
  session_cache_expire(120); // in minutes   
  ob_start();


When it executes, it gives the following error:

Error: E_WARNING
session_start()[function.session-start]: Node no longer exists at atest.php line 3 (which is the session_start()Wink

When I run this page on our website, I get no such error. How do I get rid of it in PhpED?
View user's profileFind all posts by jackmasonSend private message
Update


Joined: 09 Feb 2010
Posts: 8
Reply with quote
Actually, it does not matter in what order I put the session_ lines, the same error occurs on each of the lines and PhpED will not continue even though this is just a "warning". There apparently is something I need to do with the session before I can use any of the session functions. I need to insure the session has started so I can put values into $_SESSION that will be carried forward to invoked web pages.
View user's profileFind all posts by jackmasonSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
Are you by any chance adding data to the session that is created by php extensions? For example simplexml or something?
If so you should actually serialize() those objects before you add them to your session as PHP cannot re-instantiate objects automatically when they are not known natively.

The fact that the error is triggered in session_start means that it is trying to restore an object you put in earlier but is unable to.
View user's profileFind all posts by BlizzSend private messageVisit poster's website


Joined: 09 Feb 2010
Posts: 8
Reply with quote
What you see is the ENTIRE file. There is no other code associated with this failure that adds or subtracts or executes in any way.
View user's profileFind all posts by jackmasonSend private message
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
Might as well be, don't forget that a cookie is set for the entire domain. If you experimented with sessions in another file there might still be session data that is restored when you call session_start.
Try to delete any relevant cookies, perhaps that will solve your problem.
View user's profileFind all posts by BlizzSend private messageVisit poster's website
session start


Joined: 09 Feb 2010
Posts: 8
Reply with quote
Thanks... it was session related. When I started a new session, the problem disappeared.
View user's profileFind all posts by jackmasonSend private message
session_start
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic