views:

751

answers:

3

Getting the following error when trying to start a session:

Warning: session_start() [function.session-start]: Node no longer exists in file.php on line 3

The script uses SimpleXML to parse XML files from remote hosts. It's running on a Linux Ubuntu server with PHP 5.2.6.

Has anyone come across this message before or have an insight in to what it means?

+2  A: 

See explanation at the bottom of this page

[2009-09-25 11:41 UTC] [email protected]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Cannot serialize object wrapping 3rd party library structs. Must 
serialize the xml (to a string) and store that to session and reload the 
xml when restoring from session
Rabbott
Example here: http://www.php.net/manual/en/book.simplexml.php#87083
Rabbott
+1  A: 

Start here:

http://bytes.com/topic/php/answers/831550-session_start-node-no-longer-exists

It looks like the variable you're working with isn't an array or variable in the traditional sense: it acts more like a resource. You're going to have to loop out the values like you might with a MySQL $result.

dclowd9901
A: 

You can't store SimpleXML results in a session. Convert it to an array or extend it with wake and sleep magic methods.

Mike B