| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2005-08-22 11:09 UTC] sniper@php.net
  [2005-08-22 17:40 UTC] sniper@php.net
  [2005-08-22 22:40 UTC] carsten dot jendro at gmx dot net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 03:00:01 2025 UTC | 
Description: ------------ php5/apache crashes when using set_error_handler and session_set_save_handler together and throwing an exception in error handler. Testet with php 5.0.4.4 and 5.1rc1, apache 1 & 2 Reproduce code: --------------- <?php function ErrorHandler($errno, $errstr, $errfile, $errline) { //session_destroy(); //uncomment this line and php will not crash throw new Exception(); } function Read($id){ return "";} function Open($save_path, $session_name){ return true; } function Close(){ return true; } function Write($id, $sess_data) { return true; } function Destroy($id){ } function GarbageCollect($maxlifetime){ return true; } set_error_handler("ErrorHandler"); session_set_save_handler("Open", "Close", "Read", "Write", "Destroy", "GarbageCollect"); session_start(); //create fatal error $Foo->Bar(); ?> Expected result: ---------------- no crash ;-) Actual result: -------------- php5ts.dll!00a2b37a() php5ts.dll!00aa1248() php5ts.dll!00aa1494() php5ts.dll!00aa59fe() php5ts.dll!00aa587d() php5ts.dll!00aa5beb() php5ts.dll!009f640c() php5ts.dll!00a2e552() php5ts.dll!009f23bd() php5ts.dll!00a5244e() msvcrt.dll!77bfc2e3() ntwdblib.dll!7333ab22() ntwdblib.dll!7333f33e() ntwdblib.dll!7333f3eb() php5apache2.dll!003f2f9f() php5apache2.dll!003f34e8() php5apache2.dll!003f3163() libhttpd.dll!6ff0155f() libhttpd.dll!6ff018a9() libhttpd.dll!6ff0d582() libhttpd.dll!6ff095e6() libhttpd.dll!6ff0411f() libhttpd.dll!6ff04372() libhttpd.dll!6ff1bc3a() msvcrt.dll!77c0a3b0() kernel32.dll!7c80b50b() kernel32.dll!7c8399f3()