#34975 [Opn->Bgs]: SimpleXML objects can't be stored in sessions.
| From: | iliaa@php.net | Date: | Tue, 25 Oct 2005 03:12:28 +0000 |
| Subject: | #34975 [Opn->Bgs]: SimpleXML objects can't be stored in sessions. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-87008@lists.php.net to get a copy of this message | ||
ID: 34975
Updated by: iliaa@php.net
Reported By: maratd at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: SimpleXML related
Operating System: Windows XP
PHP Version: 5.0.5
New Comment:
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
.
Previous Comments:
------------------------------------------------------------------------
[2005-10-25 02:10:58] maratd at gmail dot com
Description:
------------
SimpleXML objects can't be stored in sessions and in turn, objects
which contain SimpleXML objects also can't be stored.
Reproduce code:
---------------
<?php
session_start();
$_SESSION['xml'] = simplexml_load_file(YOUR_XML_FILE);
?>
Expected result:
----------------
I expect the simplexml object to be loaded as a session variable, to
work, and to persist while the session is active.
Actual result:
--------------
If you first run the code above in a browser on a valid xml file,
nothing happens and it looks like it works ... but if you hit refresh
or go to a page which re-starts the session, you will see this:
Warning: session_start() [function.session-start]: Node no longer
exists in index.php on line 3
The above warning line will repeat over and over for a while ... your
simplexml object also won't work.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34975&edit=1