开发者

PHP Error: Warning: session_start() [function.session-start]: Node no longer exists

Getting the following error when trying to start a session:

Warning: session开发者_如何学Go_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?


See explanation at the bottom of this page

[2009-09-25 11:41 UTC] rrichards@php.net

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


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.


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


I had the same issue and got a fix from the site http://www.ossramblings.com/simple_xml_breaks_sessions

Actually the session will not work well while trying to store XML data, so just convert the XML data (I mean objects) to a string as below:

$temp_max_markers = (string)$Response->owner->max_markers;

$_SESSION['max_markers'] = $temp_max_markers;


also u cannot use the xml in session name as .. $_SESSION[xml];


You can change the encryption key in config file in application folder in codeigniter it works for me..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜