Increase timeout of a page

1

I have run a few tests, and they take a while to return the result, but in my domain, it has given timeout when it reaches 30sec. I know it will generate a result, it will only take some more time. Is it possible to increase the timeout?

    
asked by anonymous 14.07.2015 / 22:30

2 answers

5

You can increase the timeout as follows:

set_time_limit(120);//coloque no inicio do arquivo

You can leave without timeout (it will work indefinitely (if php is in safe mode this will not work))

set_time_limit(0);//coloque no inicio do arquivo

You can switch through php.ini

max_execution_time = 120

If you do not have access to php.ini

ini_set('max_execution_time', 120);

(all values are seconds)

    
15.07.2015 / 00:19
0

Do this:

$segundos = 0;
set_time_limit($segundos);
    
14.07.2015 / 22:52