From: carsten dot jendro at gmx dot net Operating system: Windows PHP version: 5.0.4 PHP Bug Type: Reproducible crash Bug description: crash using session_set_save_handler & throwing exception in own errorhandler
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() -- Edit bug report at http://bugs.php.net/?id=34208&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34208&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34208&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34208&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34208&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34208&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34208&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34208&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34208&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34208&r=support Expected behavior: http://bugs.php.net/fix.php?id=34208&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34208&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34208&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34208&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34208&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34208&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34208&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34208&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34208&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34208&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34208&r=mysqlcfg