#3634 - Better PHP time limit setting
| Identifier | #3634 |
|---|---|
| Issue type | Feature request or suggestion |
| Title | Better PHP time limit setting |
| Status | Completed |
| Handling member | Salman |
| Addon | core |
| Description | Calling PHP's set_time_limit is problematic for many reasons...
1) Some hosts disable it, so calling it will throw an error 2) On at least one alternative PHP implementation the function does not even exist 3) It doesn't work on PHP safe mode (although that is dropped as of PHP 5.4, and v11 is PHP 5.6+) 4) It is a global setting. Raising it a bit in library code will have the effect of potentially lowering it for the calling code (if that code had it even higher). It would be better to have some new functions... cms_disable_time_limit(); cms_extend_time_limit($secs); Where $secs can also be a number of constants... TIME_LIMIT_EXTEND_short 30 TIME_LIMIT_EXTEND_medium 100 TIME_LIMIT_EXTEND_long 1000 Just to give us some more consistency. cms_extended_time_limit looks at the current time limit and adds a number of seconds onto it. |
| Steps to reproduce | |
| Additional information | Anything based on set_time_limit can never be perfect:
a) On Windows it counts time on 'blocking' actions like downloading files, on Linux it does not b) Many other kind of timeouts can happen, e.g. CGI timeouts |
| Funded? | No |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".


Comments
There have been no comments yet