php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #39937 max_execution_time / set_time_limit could use better documentation
Submitted: 2006-12-23 15:04 UTC Modified: 2007-03-25 19:36 UTC
From: mike503+php at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 5.2.0 OS: Linux
Private report: No CVE-ID: None
 [2006-12-23 15:04 UTC] mike503+php at gmail dot com
Description:
------------
The manual does not clearly state how the seconds are determined for set_time_limit and max_execution_time - it keeps saying "seconds" - but on many of my apps i do not use sleep() or anything that shouldn't count as part of the timeout, yet it seems to never timeout; even with set_time_limit(20) set. something that low should be okay, but it doesn't appear to be.

for instance in a script i have, i set_time_limit(20) - and the script normally takes at lest 2-5 minutes of actual time to run. it uses curl a lot and string work; no sleep() involved

when i exit the script i see this:

real    0m52.776s
user    0m0.084s
sys     0m0.078s

it far surpassed "real" time - but apparently did not use much user/sys time. is that the reason for it not terminating yet? does it need to use 20 seconds of "user" time? is there any way for a function to be defined or a parameter to be added to tell it to measure in actual script execution time (without any concern for sleep() or external system calls or anything - flat out limiting how long a script runs based on human seconds?)



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-25 19:36 UTC] vrana@php.net
Already documented: "Any time spent on activity that happens outside the execution of the script such as system calls using system(), stream operations, database queries, etc. is not included when determining the maximum time that the script has been running."

There is no function for limiting human seconds AFAIK.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Nov 21 05:00:01 2025 UTC