Change request: set_time_limit(0)

Questions related to using nuBuilder Forte.

Change request: set_time_limit(0)

Postby kev1n » Mon Jun 08, 2020 10:38 pm

Hi Steven,

When using a shared hosting environment where the user has no control of the web server, set_time_limit() might be disabled (in php.ini)

Suggestion: Replace
Code: Select all
set_time_limit(0);

https://github.com/steven-copley/nubuil ... on.php#L11

with

Code: Select all
nuSetTimeLimit(0);


Declaration of nuSetTimeLimit():

Code: Select all
function nuSetTimeLimit(){
   if (function_exists('set_time_limit')) {
      set_time_limit(0);
   }
}


A similar code is used in \nudb\libraries\classes\Util.php
kev1n
 
Posts: 784
Joined: Mon Oct 15, 2018 2:13 am

Re: Change request: set_time_limit(0)

Postby kev1n » Wed Jul 01, 2020 3:07 pm

Hi Steven,

Basically, it's just replacing
Code: Select all
set_time_limit(0);
with

Code: Select all
if (function_exists('set_time_limit')) {
      set_time_limit(0);
}



Could you add that?
kev1n
 
Posts: 784
Joined: Mon Oct 15, 2018 2:13 am


Return to General