Re: Unstoppable Script Execution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2010-08-25 at 14:30 -0400, Steven Staples wrote:

> Ok, this is my first post here.  I have been writing in PHP for about 7
> years or so now, I am not an expert, but I do pretend to be one :P
> 
> ANYWAY, my client and I have been working on a strange issue that I cannot
> seem to pin point, or replicate, not to mention, it has no rhyme or reason
> for it to happen except if maybe the user submits a form, and their internet
> connection "hiccups" or the script terminates.
> 
> Some times, the submitted form can have probably more information than it
> should, and the script is doing more than it should, so the execution time
> may take upwards of a few seconds to a minute or so.
> 
> My question is, is the function/setting:
> Ignore_user_abort(true);
> Going to possibly fix my issue?
> 
> Could I combine that with:
> Ignore_user_abort(true);
> Set_time_limit(900); # 15 minutes, JUST INCASE of a problem!
> 
> So that if after 15 minutes, if the script has gone CRAZY, it will at least
> not run forever?
> 
> Any help?  Ideas?  Is this a good idea?
> 
> Steven Staples
> 
> 
> 
> 


The manual entry for this suggests it does exactly what you need it to,
so I would go out on a limb and say yes in this case. A timer might not
be such a good idea for all scripts, but maybe some that you know should
not run above a certain duration.

Thanks,
Ash
http://www.ashleysheridan.co.uk



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux