ID: 28378 Updated by: [EMAIL PROTECTED] Reported By: Kattana_ at hotmail dot com -Status: Open +Status: Feedback Bug Type: Apache2 related Operating System: Windows XP Pro SP1 PHP Version: 5.0.0RC2 New Comment:
What does "PHP 4 compatibility is enabled" mean? Previous Comments: ------------------------------------------------------------------------ [2004-05-12 22:12:55] Kattana_ at hotmail dot com Description: ------------ I am running php5rc2 and apache 2.0.49 on winXP sp1. php4 compatability is enabled. When running the following piece of code i got Application error from apache.exe. the error text is "The instruction at "0x0068d6ff" referenced memory at 0xffffffff. The memory could not be "read"." The line causeing the error is: $this->documentElement->appendChild($element); Reproduce code: --------------- class Authors extends DomDocument { function __construct() { //has to be called! parent::__construct(); } function addAuthor($name,$password,$group) { $item = $this->createElement('author'); $attr = $item->setAttribute('name',$name); $attr = $item->setAttribute('password',md5($password)); if($group=='none'){ $this->documentElement->appendChild($item); }else{ foreach($this->documentElement->childNodes as $element){ if($element->nodeName == 'group' && $element->getAttribute('name') == $group){ $element->appendChild($item); $this->documentElement->appendChild($element); } } } } } Expected result: ---------------- Unknown The line: $element->appendChild($item); wasnt appending the child so i was testing some quick hacks to see what would work. Actual result: -------------- PHP crash and no output. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28378&edit=1