From: kturner at kgt dot net
Operating system: Windows 2003 Server
PHP version: 5.0.2
PHP Bug Type: SimpleXML related
Bug description: SimpleXML objects not being read from saved session
Description:
------------
SimpleXML objects can be saved into a session file, but, they are not
being extracted.
Reproduce code:
---------------
<?php session_start(); // TEST1.PHP
$xml_string = <<< EOT
<GenQuoteDetails>
<BaseFareAmt>26400</BaseFareAmt>
<TaxDataAry><TaxData><Country>US</Country><Amt>00019.80</Amt></TaxData></TaxDataAry>
</GenQuoteDetails>
EOT;
$xml_tree = simplexml_load_string( $xml_string );
$_SESSION['tree'] = $xml_tree;
echo"<pre>";print_r($xml_tree);echo"</pre>";
?>
<?php session_start(); // TEST2.PHP
$xml_tree = $_SESSION['tree'];
echo"<pre>";print_r($xml_tree);echo"</pre>";
?>
Expected result:
----------------
SimpleXMLElement Object
(
[BaseFareAmt] => 26400
[TaxDataAry] => SimpleXMLElement Object
(
[TaxData] => SimpleXMLElement Object
(
[Country] => US
[Amt] => 00019.80
)
)
)
Actual result:
--------------
SimpleXMLElement Object
(
)
--
Edit bug report at http://bugs.php.net/?id=30984&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30984&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=30984&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=30984&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30984&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30984&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30984&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30984&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30984&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30984&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30984&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=30984&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=30984&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30984&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30984&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30984&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30984&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30984&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30984&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30984&r=mysqlcfg