2010-03-17 56 views
2

获取试图启动一个会话时,出现以下错误:PHP错误:警告:在session_start()[function.session启动]:节点不再存在

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

脚本使用SimpleXML来解析XML来自远程主机的文件。它运行在使用PHP 5.2.6的Linux Ubuntu服务器上。

有没有人遇到过此消息之前,或有一个洞察到什么意思?

+0

你究竟做了什么? – Gumbo 2010-03-17 16:30:00

+0

@Gumbo我个人还是剧本? – Camsoft 2010-03-17 16:31:38

+4

那么,因为我们正在谈论你的脚本...... – Gumbo 2010-03-17 16:43:33

回答

4

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 
+1

示例:http://www.php.net/manual/en/book.simplexml.php#87083 – Rabbott 2010-03-17 16:35:08

+0

谢谢!这让我疯狂。伟大的事情要知道。 – split19 2012-08-02 18:34:09

+0

这个例子很好地解释了这个问题,谢谢! – 2013-08-05 15:56:44

2

您无法将SimpleXML结果存储在会话中。将其转换为数组或使用唤醒和睡眠魔法方法进行扩展。

2

我有同样的问题,并得到了现场修复http://www.ossramblings.com/simple_xml_breaks_sessions

其实在尝试存储XML数据的会话将无法正常工作,所以只是将XML数据(我的意思是对象)的字符串作为如下:

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

$_SESSION['max_markers'] = $temp_max_markers; 
0

还你无法在会话名称使用xml作为.. $_SESSION[xml];

0

您可以更改配置文件中的应用程序文件夹中笨的加密密钥,它的工作原理对于m e ..

相关问题