Questions over questions 
July 17th, 2005, 12:30 AM
| | | Questions over questions
Hello people,
I have a problem with my ISP! He kills my php script, if they were executed
over 30 seconds.
Can I use some trick to fake a little bit? That I can execute the script
longer!?
Greeting! | 
July 17th, 2005, 12:30 AM
| | | Re: Questions over questions
Sven Dzepina wrote:
[color=blue]
> Hello people,
>
> I have a problem with my ISP! He kills my php script, if they were executed
> over 30 seconds.
> Can I use some trick to fake a little bit? That I can execute the script
> longer!?
>
> Greeting!
>
>[/color]
If your ISP doesn't run your script in safe mode, which it most likely
does, then you can set_time_limit(0); for unlimited execution time.
Otherwise there is probably no way to let it run longer. | 
July 17th, 2005, 12:30 AM
| | | Re: Questions over questions
"John Downey" <blah@doesntexist.com> wrote in message
news:8pdib.121103$xx4.20419112@twister.neo.rr.com. ..[color=blue]
> Sven Dzepina wrote:
>[color=green]
> > Hello people,
> >
> > I have a problem with my ISP! He kills my php script, if they were[/color][/color]
executed[color=blue][color=green]
> > over 30 seconds.
> > Can I use some trick to fake a little bit? That I can execute the script
> > longer!?
> >
> > Greeting!
> >
> >[/color]
> If your ISP doesn't run your script in safe mode, which it most likely
> does, then you can set_time_limit(0); for unlimited execution time.
> Otherwise there is probably no way to let it run longer.
>[/color]
I heard a rumour that the sleep() function resets the script execution time
each time it's called. So if you use it in conjunction with a loop you can
reset the script execution time after each cycle.
Not tested tho! | 
July 17th, 2005, 12:30 AM
| | | Re: Questions over questions
Thanks!
My ISP has no safe_mode! =)
"John Downey" <blah@doesntexist.com> schrieb im Newsbeitrag
news:8pdib.121103$xx4.20419112@twister.neo.rr.com. ..[color=blue]
> Sven Dzepina wrote:
>[color=green]
> > Hello people,
> >
> > I have a problem with my ISP! He kills my php script, if they were[/color][/color]
executed[color=blue][color=green]
> > over 30 seconds.
> > Can I use some trick to fake a little bit? That I can execute the script
> > longer!?
> >
> > Greeting!
> >
> >[/color]
> If your ISP doesn't run your script in safe mode, which it most likely
> does, then you can set_time_limit(0); for unlimited execution time.
> Otherwise there is probably no way to let it run longer.
>[/color] | 
July 17th, 2005, 12:30 AM
| | | Re: Questions over questions
"Sven Dzepina" <mail@styleswitch.de> wrote in message
news:3f8978e3$0$25162$9b4e6d93@newsread2.arcor-online.net...[color=blue]
> Thanks!
> My ISP has no safe_mode! =)
> "John Downey" <blah@doesntexist.com> schrieb im Newsbeitrag
> news:8pdib.121103$xx4.20419112@twister.neo.rr.com. ..[color=green]
> > Sven Dzepina wrote:
> >[color=darkred]
> > > Hello people,
> > >
> > > I have a problem with my ISP! He kills my php script, if they were[/color][/color]
> executed[color=green][color=darkred]
> > > over 30 seconds.
> > > Can I use some trick to fake a little bit? That I can execute the[/color][/color][/color]
script[color=blue][color=green][color=darkred]
> > > longer!?
> > >
> > > Greeting!
> > >
> > >[/color]
> > If your ISP doesn't run your script in safe mode, which it most likely
> > does, then you can set_time_limit(0); for unlimited execution time.
> > Otherwise there is probably no way to let it run longer.[/color][/color]
If you were hosting your account on one of my servers and I found you
defeating the 30 second limit I'd be terminating your account as I'd deem
that you'd broken the Acceptable User Policy. The 30 second time limit is to
stop errant scripts running indefinitely and consuming resources needlessly
for the disbenefit of other users. If you get into the habit of turning this
time limit off you'll eventually create one of these scripts. I don't think
it's good programming practice to leave a user with a script running with no
indication that it's working. This is why we normally segment long processes
into smaller chunks and why things like progress bars were invented.
Paulus | 
July 17th, 2005, 12:31 AM
| | | Re: Questions over questions
> If you were hosting your account on one of my servers and I found you[color=blue]
> defeating the 30 second limit I'd be terminating your account as I'd deem
> that you'd broken the Acceptable User Policy. The 30 second time limit is to
> stop errant scripts running indefinitely and consuming resources needlessly
> for the disbenefit of other users. If you get into the habit of turning this
> time limit off you'll eventually create one of these scripts. I don't think
> it's good programming practice to leave a user with a script running with no
> indication that it's working. This is why we normally segment long processes
> into smaller chunks and why things like progress bars were invented.[/color]
This begs the question.....
How do you run a php process off-line?
I've built a small perl daemon (php too old) which runs php jobs
off-line. Communication is all via a mySQL table and I have a 'job
queue' webpage to keep an eye on how things are going.
I would really like to be able to spawn offline jobs from a web page
though. Something like....
click the link to get your report...
up pops a small browser window with a progress bar
when the progress bar completes the window reloads
with the report
.... but short of being able to fragment the report build process I can't
think how to do it. | 
July 17th, 2005, 12:31 AM
| | | Re: Questions over questions
Kevin Thorpe wrote:[color=blue][color=green]
>> If you were hosting your account on one of my servers and I found you
>> defeating the 30 second limit I'd be terminating your account as I'd deem
>> that you'd broken the Acceptable User Policy. The 30 second time limit
>> is to
>> stop errant scripts running indefinitely and consuming resources
>> needlessly
>> for the disbenefit of other users. If you get into the habit of
>> turning this
>> time limit off you'll eventually create one of these scripts. I don't
>> think
>> it's good programming practice to leave a user with a script running
>> with no
>> indication that it's working. This is why we normally segment long
>> processes
>> into smaller chunks and why things like progress bars were invented.[/color]
>
>
> This begs the question.....
>
> How do you run a php process off-line?
>
> I've built a small perl daemon (php too old) which runs php jobs
> off-line. Communication is all via a mySQL table and I have a 'job
> queue' webpage to keep an eye on how things are going.
>
> I would really like to be able to spawn offline jobs from a web page
> though. Something like....
> click the link to get your report...
> up pops a small browser window with a progress bar
> when the progress bar completes the window reloads
> with the report
> ... but short of being able to fragment the report build process I can't
> think how to do it.
>[/color]
Perhaps some nice javascript and flush() if used right. | | Thread Tools | Search this Thread | | | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 220,989 network members.
|