#34975 [NEW]: SimpleXML objects can't be stored in sessions.
From: maratd at gmail dot com
Operating system: Windows XP
PHP version: 5.0.5
PHP Bug Type: SimpleXML related
Bug description: SimpleXML objects can't be stored in sessions.
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 bug report at http://bugs.php.net/?id=34975&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34975&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34975&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34975&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34975&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34975&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34975&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34975&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34975&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34975&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34975&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=34975&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=34975&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34975&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34975&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34975&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34975&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34975&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34975&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34975&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34975&r=mysqlcfg
Thread (5 messages)
- maratd at gmail dot com