From: Kattana_ at hotmail dot com Operating system: Windows XP Pro SP1 PHP version: 5.0.0RC2 PHP Bug Type: Apache2 related Bug description: Apache.exe Application error cause by php
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 bug report at http://bugs.php.net/?id=28378&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28378&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28378&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28378&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28378&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28378&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28378&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28378&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28378&r=support Expected behavior: http://bugs.php.net/fix.php?id=28378&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28378&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28378&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28378&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28378&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28378&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28378&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28378&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28378&r=float