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
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)?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.