Jump to content

Prevent browser timeout


regent

Recommended Posts

I have a problem with one of my scripts.  Depending on the amount of input, the script can take up to 3 minutes to run, but by then the browser has already timed out.  I've tried:

 

set_time_limit(0);

ini_set("memory_limit","120M");

 

at the beginning of the script, and they didn't help at all.

 

Also tried echoing something in my foreach loop, but that didn't help either.  Any foolproof way to prevent browser timeout?

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/47462-prevent-browser-timeout/
Share on other sites

Oh that reminds me,

 

what about

break the code into parts, and have the code continue from the last part,

 

ie have

$start = $_Get['Start'];

and after every 500 loops it uses header("location: myself?Start=X"); X being the last loop counter

 

if that makes sence!

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.