#33218 [Fbk->Csd]: Apache crash on declaring a private methode __destruct with debug_backtrace
| From: | robo47 at robo47 dot net | Date: | Thu, 02 Jun 2005 10:11:15 +0000 |
| Subject: | #33218 [Fbk->Csd]: Apache crash on declaring a private methode __destruct with debug_backtrace | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-79804@lists.php.net to get a copy of this message | ||
ID: 33218
User updated by: robo47 at robo47 dot net
Reported By: robo47 at robo47 dot net
-Status: Feedback
+Status: Closed
Bug Type: Reproducible crash
Operating System: Linux and Windows
PHP Version: 5.0.4
New Comment:
Okay thx, tested the Windows CVS-Build and it worked without an Error.
greetz
robo47
Previous Comments:
------------------------------------------------------------------------
[2005-06-02 11:45:37] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.0-win32-latest.zip
I can't reproduce this, so it might be fixed already.
------------------------------------------------------------------------
[2005-06-02 11:34:10] robo47 at robo47 dot net
Description:
------------
The following Code was testet on a Suse 9.0 Server (PHP 5.0.4) and on a
local Windows-machine(PHP 5.0.2) and it crashs the Apache Webserver:
The Error Occurs when i want to use my error-handler (the posted
version is a minimized version with only relevant parts) and i set the
__destruct-function as an private, not as a public methode.
Using the standard-errorhandler the following Error is shown:
Warning: Call to private testclass::__destruct() from context '' during
shutdown ignored in Unknown on line 0
Reproduce code:
---------------
<?php
error_reporting (E_ALL);
class ErrorHandlerClass {
public function __construct() {
set_error_handler(array(&$this,'ErrorHandler'));
}
public function ErrorHandler($errno, $errstr, $errfile, $errline) {
echo debug_backtrace(); // the problem which crashs the script
}
}
$error = new ErrorHandlerClass();
class testclass {
public function __construct() {
echo 'test1';
}
private function __destruct() {// here is the Error, because the
__destruct should be public !!
echo 'test2';
}
}
$test = new testclass();
?>
Expected result:
----------------
The Output of debug_backtrace(); should appear
Actual result:
--------------
On Windows-machine the Apache crashs and restarts with this Entry in
the apache-errorlog:
[Thu Jun 02 11:23:11 2005] [notice] Parent: child process exited with
status 1073807364 -- Restarting.
the linux-machine shows the following in the apache-errorlog:
[Wed Jun 01 17:49:21 2005] [notice] child pid 26331 exit signal
Segmentation fault (11)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33218&edit=1