php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30984 SimpleXML objects not being read from saved session
Submitted: 2004-12-04 20:00 UTC Modified: 2004-12-05 11:17 UTC
Votes:5
Avg. Score:4.4 ± 1.2
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:0 (0.0%)
From: kturner at kgt dot net Assigned:
Status: Wont fix Package: SimpleXML related
PHP Version: 5.0.2 OS: Windows 2003 Server
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
20 + 40 = ?
Subscribe to this entry?

 
 [2004-12-04 20:00 UTC] 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
(
)



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-05 11:18 UTC] chregu@php.net
Doesn't work. Neither with SimpleXML nor with DOM.

Expected behaviour.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Nov 26 22:01:23 2020 UTC