php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2165 Bug in set_time_limit()
Submitted: 1999-08-26 10:48 UTC Modified: 1999-08-31 11:39 UTC
From: christophe dot massiot at mail dot dotcom dot fr Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0 Latest CVS (26/08/1999) OS: LinuxPPC R5/Linux 2.2.10
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: christophe dot massiot at mail dot dotcom dot fr
New email:
PHP Version: OS:

 

 [1999-08-26 10:48 UTC] christophe dot massiot at mail dot dotcom dot fr
The set_time_limit() function seems to be misbehaving. With the following
script :
<?
set_time_limit(9);
for ($i = 0; $i < 500000; $i++) {
  $table[] = $i;
}     
?>

I get the output :

Content-Type: text/html

<br>
<b>Fatal error</b>:  Maximum execution time of 60 seconds exceeded in <b>test.php</b> on line <b>3</b><br>

So first there is a cosmetic problem with the 60 (which is my php.ini default).
Second, the script seems to take much more time than 9 seconds
before this message is displayed.
Third, AFTER this message is displayed, the script still takes
CPU time for several seconds or even minutes with big
values of time_limit. I suppose it frees its data. Is there something
to do ?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-08-31 11:39 UTC] ssb at cvs dot php dot net
Fixed in CVS.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 15 02:01:33 2025 UTC