From: maurice at alletha dot nl Operating system: Windows/Linux PHP version: Irrelevant PHP Bug Type: Unknown/Other Function Bug description: set_error_handler race
Description: ------------ When creating a error function which has a parameter with an reference, php will create an endless loop in calling itself (i think). The proces keeps running and will not stop. You can blog up a windows machine running under iis/cgi because it doesn't react on set_time_limit(). I've seen this problem in php 4.x and 5.x under windows and in linux on a dual system. Linux with a single cpu seemed not to have this problem (?) (I'm using an additional parameter to my error function because of custom calling of the function) Reproduce code: --------------- <? function customErrorHandler($fErrNo,$fErrStr,$fErrFile,$fErrLine,&$fClass) { echo "error :".$fErrStr; } set_time_limit(5); error_reporting(E_ALL); set_error_handler("customErrorHandler"); define("TEST",2); //should return a notice that the constant is already defined define("TEST",3); ?> Expected result: ---------------- There should be a notice about the redefined "TEST" define Actual result: -------------- An endless loop. -- Edit bug report at http://bugs.php.net/?id=29890&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29890&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29890&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29890&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=29890&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29890&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29890&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29890&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29890&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29890&r=support Expected behavior: http://bugs.php.net/fix.php?id=29890&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29890&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29890&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29890&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29890&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29890&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29890&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29890&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29890&r=float