#30984 [Opn->WFx]: SimpleXML objects not being read from saved session
| From: | chregu@php.net | Date: | Sun, 05 Dec 2004 10:19:01 +0000 |
| Subject: | #30984 [Opn->WFx]: SimpleXML objects not being read from saved session | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-69807@lists.php.net to get a copy of this message | ||
ID: 30984
Updated by: chregu@php.net
Reported By: kturner at kgt dot net
-Status: Open
+Status: Wont fix
Bug Type: SimpleXML related
Operating System: Windows 2003 Server
PHP Version: 5.0.2
New Comment:
Doesn't work. Neither with SimpleXML nor with DOM.
Expected behaviour.
Previous Comments:
------------------------------------------------------------------------
[2004-12-04 20:00:14] kturner at kgt dot net
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 this bug report at http://bugs.php.net/?id=30984&edit=1