ID:               26286
 Comment by:       casuttc at postmail dot ch
 Reported By:      igg10 at alu dot ua dot es
 Status:           No Feedback
 Bug Type:         Apache2 related
 Operating System: Windows 2000
 PHP Version:      4.3.4
 New Comment:

I have the same problem with Windows 2000 SP4, Apache 2.0.49,
php5.0.0RC3 when I use a php-Script with OCI8-functions. Please help
me.


Previous Comments:
------------------------------------------------------------------------

[2004-06-05 15:33:26] info at phpsydney dot com

The error moves around. When I add code to pinpoint the error, the
error moves because of the extra code. Here is some code and the
output. The content of the array becomes corrupt. The foreach goes in
to a loop because the array is corrupted after the start of the foreach
loop. In the original code in my script, the array contained objects,
the objects were corrupted, and then Apache blew up with the 3221225477
error. I replaced the objects with strings and the array still became
corrupt, only the symptom changed.

I think the 3221225477 error occurs when PHP's variable space becomes
corrupt and the corruption damages an object.

$attributes = array('name', 'type', 'value');
print('attributes: ');
var_dump($attributes);
print('<br>');
foreach($attributes as $attribute_key => $attribute_name)
        {
        print('At attribute: ' . $attribute_name . ' attributes: ');
        var_dump($attributes);
        print('<br>');
        if(isset($this->_attribute[$attribute_name]))
                {
                unset($attributes[$attribute_key]);
                }
        }

attributes: array(3) { [0]=>  string(4) "name" [1]=>  string(4) "type"
[2]=>  string(5) "value" }
At attribute: name attributes: array(2) { [0]=> string(4) "name" [1]=>
int(0) }
At attribute: 0 attributes: array(2) { [0]=> int(0) [1]=> int(0) }
At attribute: 0 attributes: array(2) { [0]=> int(0) [1]=> int(0) }
At attribute: 0 attributes: array(2) { [0]=> int(0) [1]=> int(0) }
At attribute: 0 attributes: array(2) { [0]=> int(0) [1]=> int(0) }

------------------------------------------------------------------------

[2004-06-04 14:40:57] info at phpsydney dot dot dot net

I updated to PHP 4.3.7. Same problem. Have latest Apache 2. I notice
people reporting the same error message for modperl, ldap, imagemagick,
and tomcat on both Apache 1 and Apache 2.

Memory problem? No, I increased from 8 to 200 MB and still same problem
in same time.

I added var_dump everywhere to see what happens to the script
variables. Just before the crash the variables are corrupted as if
references were all broken. vardump shows variables within arrays as
now containing arrays. Entries in arrays get & in front of them which
are not there in earlier vardump.

------------------------------------------------------------------------

[2004-05-31 17:00:53] populus117 at hotmail dot com

I discovered something that may have been the problem.
Quite trivial and embbrasing though...

I was testing all the different combinations between Apache 1.3.3,
Apache 2.0.4, PHP 4.3.6 and PHP 5.0.0 RC2, and in the process of
switching between PHP4 and PHP5, I found out that I did not copy the
php5ts.dll to the system32 folder.

I know that in the readme it says that the system searches the PHP
folder as well for this file but once I put that file into system32, it
*appears* to have solved the problem. I haven't seen the bug so far and
hopefully I'm right =D

Conclusion: Stupid mistakes are the hardest to realise and find.

------------------------------------------------------------------------

[2004-05-31 14:49:55] populus117 at hotmail dot com

Getting exact same error. I'm using:
Windows 2000 SP4
Apache 2.0.48
PHP5.0.0-RC2

I tried to trace the source of the problem but found it difficult, if
not impossible as the error seems to occur randomly. Loading the same
page with the same conditions doesn't seem to consistantly give me the
error.
The best reason I could think of right now is that there are too many
loops in the page (I checked for infinite loops and found none).
The pages that has this happen to it is mainly pages with databse
queries, which takes a while since the database is remotely accessed.
Would be nice if this was looked into and hopefully fixed soon.

------------------------------------------------------------------------

[2004-05-17 16:09:53] hakk at email dot it

Apache: 2.0.49 (happens with apache 1.3.31 too)
PHP:    5.0.0RC2
OS:     Windows XP PRO SP1

The code below reproduces the crash on my machine.

<?
class my_error {
  private $_errors;
                private $_errorNumber;

  function __construct() {
    set_error_handler(array(&$this, 'handler'), E_ALL);
                                $this->_errorNumber = 0;
  }

  function handler($errno, $errstr, $errfile, $errline, $errctx) {
    echo "ERROR= $errno<br> $errstr<br> $errfile<br> $errline<br>
$errctx<br>";
    echo $this->_errorNumber."<br>";

    /* if you comment out the next 4 statements, everything works
correctly */
                        $this->_errors[$this->_errorNumber]['errno'] = $errno; 
                                $this->_errors[$this->_errorNumber]['errstr'] = 
$errstr;
                                $this->_errors[$this->_errorNumber]['errfile'] = 
$errfile;
                                $this->_errors[$this->_errorNumber]['errline'] = 
$errline;
                                $this->_errorNumber++;
  }
}

class my_class {
  function throw_exception($param1, $param2) {
    echo "$param1, $param2";
    throw new Exception();
  }
}

$err = new my_error; //if i dont use my own error handling class,
everything works out
try {
  $test = new my_class;
  call_user_func_array(array($test, "throw_exception"),
array('a','b')); //makes apache crash
  //$test->throw_exception('a','b'); this works with no problems
}
catch(Exception $e) {
  echo $e;
}
?>

A few notes...
If i dont use my error_class, everything works fine, and PHP gives me
this warning
"Warning: call_user_func_array() [function.call-user-func-array]:
Unable to call my_class::throw_exception() in C:\Programmi\Apache
Group\Apache2\htdocs\testfield\exception.php on line 40"
problably since i threw an exception in that function.

If i use my error_class and i dont use the call_user_func_array, but
instead i call $test->throw_exception() everything works fine again
(because no Warning is generated?)

If i use my error class and call call_user_func_array then everything
blows up and apache restarts giving
"[Mon May 17 15:59:16 2004] [notice] Parent: child process exited with
status 3221225477 -- Restarting."

Hope this helps.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/26286

-- 
Edit this bug report at http://bugs.php.net/?id=26286&edit=1

Reply via email to