Jump to content

Early script termination


elad135

Recommended Posts

I really hit a wall while trying to figure out how to stop my script from terminating early.

First, my website is located on an IIS server.

Second, the script I'm referring to is supposed to be some kind of a 'thread' (and I know this is not the place to use PHP but it's not my website and it's not my script - I only need to get it to work). So it basically opens in the background and stays alive by using the Sleep function inside a For loop (until some term has been met).

 

My problem is that the script is being terminated after about 3-5 minutes (not sure exactly after how long). I already tried adding the set_time_limit(0) and it had no effect.

Does anyone have an idea how can I solve this problem and why the set_time_limit(0) is not working?

 

P.S.

The server is not in Safe Mode.

Link to comment
https://forums.phpfreaks.com/topic/247044-early-script-termination/
Share on other sites

I prefer not to post the code here because this isn't my code and I'm not sure that the person who owns the code would want me to post it.

 

Regarding the possibility of it error'ing out. The code seems to work just fine on my own local server. The server that is giving me the problem is my university's server. It also means that I don't have access to the console.

 

Just in case it does error out for some reason, specifically on this server, what method can I use to print out all the errors that script sends out (including MySQL errors)?

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.