View Issue Details

IDProjectCategoryView StatusLast Update
0003634Composrcorepublic2019-06-21 19:36
ReporterChris GrahamAssigned ToSalman 
SeverityFeature-request 
Status resolvedResolutionfixed 
Product Version 
Fixed in Version 
Summary0003634: Better PHP time limit setting
DescriptionCalling 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.
Additional InformationAnything 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
TagsNo tags attached.
Time estimation (hours)1.5
Sponsorship open

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2018-06-28 00:34 Chris Graham New Issue
2018-06-28 12:22 Chris Graham Sponsorship open 0 =>
2018-06-28 12:22 Chris Graham Description Updated View Revisions
2019-04-16 18:00 Chris Graham Assigned To => Salman
2019-04-16 18:00 Chris Graham Status non-assigned => assigned
2019-06-21 19:36 Chris Graham Status assigned => resolved
2019-06-21 19:36 Chris Graham Resolution open => fixed