Mrweiner
Mrweiner

Reputation: 521

Remove page timeout for single path?

We've got a report that needs to be generated at /our/really-cool/report, but the dataset being queried is causing a timeout. Is it possible to leave the regular timeout for the sever, but somehow set it to infinite for just this path?

Upvotes: 1

Views: 42

Answers (1)

Darragh Enright
Darragh Enright

Reputation: 14136

Use set_time_limit() with a value of 0. As stated in the parameter docs:

The maximum execution time, in seconds. If set to zero, no time limit is imposed.

You may also want to look at max_execution_time which should be able to set in your script with ini_set() assuming your are not in safe mode.

Upvotes: 2

Related Questions