#28378 [Opn->Fbk]: Apache.exe Application error cause by php

From: Date: Thu, 13 May 2004 07:14:13 +0000
Subject: #28378 [Opn->Fbk]: Apache.exe Application error cause by php
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-59567@lists.php.net to get a copy of this message
 ID:               28378
 Updated by:       derick@php.net
 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


Thread (5 messages)

« previous php.bugs (#59567) next »