php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #19244 set_time_limit() and safe_mode
Submitted: 2002-09-05 06:34 UTC Modified: 2002-09-05 06:50 UTC
From: phpnet at shredzone dot de Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 4.2.2 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: phpnet at shredzone dot de
New email:
PHP Version: OS:

 

 [2002-09-05 06:34 UTC] phpnet at shredzone dot 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-05 06:50 UTC] 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:53 UTC] phpnet at shredzone dot de
Oops... I forgot about that. Sorry for bothering.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 22:01:29 2024 UTC