Increase timeout of a page

Asked

Viewed 16,294 times

3

I’ve been running some tests, and they take a while to return the result, but in my domain, it has been timeout when it reaches 30 seconds. I know it will generate a result, it will only take some more time. It is possible to increase the timeout?

2 answers

7


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

One can change 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)

1

Do so:

$segundos = 0;
set_time_limit($segundos);

Browser other questions tagged

You are not signed in. Login or sign up in order to post.