#19244 [Com]: set_time_limit() and safe_mode

From: Date: Thu, 05 Sep 2002 11:53:55 +0000
Subject: #19244 [Com]: set_time_limit() and safe_mode
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18483@lists.php.net to get a copy of this message
ID: 19244 Comment by: phpnet@shredzone.de Reported By: phpnet@shredzone.de Status: Won't fix Bug Type: Feature/Change Request PHP Version: 4.2.2 New Comment: Oops... I forgot about that. Sorry for bothering. Previous Comments: ------------------------------------------------------------------------ [2002-09-05 06:50:24] derick@php.net We can not do this, as set_time_limit() resets the timer to 0 when it is called. Thus you can use "set_time_limit" at the end of your loop operation and still starve the server: <?php while (1) { $a = $a + 1; echo $a; set_time_limit(5); } ?> Derick ------------------------------------------------------------------------ [2002-09-05 06:34:33] phpnet@shredzone.de I have a change request for set_time_limit() in combination with safe_mode. Instead of disallowing to set the time limit at all when safe_mode is activated, you could allow the program to *reduce* the time limit, compared to the default settings. It won't harm the server security if the developer explicitely wants his script to timeout in 10 seconds instead of 30 or maybe inifinite. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19244&edit=1

« previous php.bugs (#18483) next »