Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bypassing max_execution_time?

Tags:

php

It's 10 seconds on my server, and that's not enough for what I'm trying to do. It's been disabled by the webhost too.

If, after a certain amount of time of executing, I execute a separate PHP page, does that count towards the same time or does it start over on that page?

Is there another way around it?

like image 969
mowwwalker Avatar asked Sep 06 '11 11:09

mowwwalker


2 Answers

Easy way around max execution time is to set time limit like so:

set_time_limit(0);

like image 121
Kevin Collins Avatar answered Sep 29 '22 23:09

Kevin Collins


A possible workaround might involve setting cron jobs to do your task in smaller parts. I appreciate this is probably quite undesirable.

like image 24
IsisCode Avatar answered Sep 30 '22 00:09

IsisCode