From:             seventhcycle at yahoo dot com
Operating system: linux
PHP version:      4.3.3
PHP Bug Type:     Feature/Change Request
Bug description:  Add function handler for set_time_limit()

Description:
------------
It would be nice to have an optional function handler for when
set_time_limit() goes over the set amount of time.

Reproduce code:
---------------
<?

   set_time_limit(30, "errfunc");
   while(1) { $g=1; }

   function errfunc()
   {
      echo "Hey, this is taking too long!";
      exit;
   }
?>

Expected result:
----------------
After 30 seconds, errfunc() is called, and the program executes
gracefully, without an error message and a line number.

This would be useful, say, if doing a merchant transaction with a separate
server and it's stalling on giving a response.

Actual result:
--------------
Hey, this is taking too long

-- 
Edit bug report at http://bugs.php.net/?id=26024&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26024&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26024&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26024&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26024&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26024&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=26024&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26024&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26024&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26024&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26024&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26024&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26024&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26024&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26024&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26024&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26024&r=float

Reply via email to