|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-06-02 11:45 UTC] sniper@php.net
[2005-06-02 12:11 UTC] robo47 at robo47 dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 21 04:00:02 2025 UTC |
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)