#27237 [Opn->Csd]: Working with simplexml crashes apache2
| From: | rrichards@php.net | Date: | Fri, 13 Feb 2004 14:59:43 +0000 |
| Subject: | #27237 [Opn->Csd]: Working with simplexml crashes apache2 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-54862@lists.php.net to get a copy of this message | ||
ID: 27237
Updated by: rrichards@php.net
Reported By: gerry dot rodman at ness-usa dot com
-Status: Open
+Status: Closed
Bug Type: XML related
Operating System: Windows 2003
PHP Version: 5CVS-2004-02-12 (dev)
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2004-02-13 00:20:25] gerry dot rodman at ness-usa dot com
Description:
------------
VERSION INFO: I am using the BETA 4 Release published on 2/2/04. (This
was not available in the Version drop down).
Also running on Apache 2
Run the code below in IE 6. When it returns, refresh the browser
(CTRL-R). It will crash Apache2 everytime.
The last version of the code I was working with prior to BETA 4 was a
2/1/04 snapshot. I tested this specific code using that snapshot..no
error... but (as I said) it blows up on BETA4. I would like to call
your attention to another bug I reported which I believe was first
fixed in RC4. This may be worth looking at since it was also a
SimpleXML problem. Perhaps fixing this bug is related to the current
bug. I am just guessing here. The url for the fixed bug is:
http://bugs.php.net/bug.php?id=27115
Thank you,
gr
Reproduce code:
---------------
<?
class ThemeInstance
{
public $name;
public function __construct($ti)
{
$this->name = $ti->name;
}
}
class Holder
{
public $themeCurrent;
public function __construct()
{
$xml =
'<themes><theme><name>blue</name></theme></themes>';
$config = simplexml_load_string($xml);
$themeInstance = new ThemeInstance($config->theme);
$this->themeCurrent = $themeInstance;
}
}
$h = new Holder();
$x = $h->themeCurrent;
echo $x->name; // This statement causes it to blow
?>
Expected result:
----------------
I expect it to print the word "blue" and when I refresh the browser
(CTRL-R) to print the word "blue" again
Actual result:
--------------
It prints the word "blue". If I refresh the browser it crashes
Apache2.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27237&edit=1