Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.
Hi , i just wondering how long should a php process run ?
For example : in a php script i use ignore_user_abort , set_time_limit(0) , this means this process may last forever , but it will stop , and my question is how long should it run ?
(sorry for my bad english , and i don't know where to post this question )
quocbao wrote:Hi , i just wondering how long should a php process run ?
For example : in a php script i use ignore_user_abort , set_time_limit(0) , this means this process may last forever , but it will stop , and my question is how long should it run ?
(sorry for my bad english , and i don't know where to post this question )
That really depends upon what you're doing.
I mean, you can write entire services in PHP. They'd want to run forever. Running PHP from command line can run as long as you like until the process is aborted manually. Even with set_time_limit(0) in a web page your script will still stop when Apache times out. ignore_user_abort() is a different situation though.
Even with set_time_limit(0) in a web page your script will still stop when Apache times out
I didn't notice about apache timeout , then there might be some problems.
I want to ask this question because i have a small script to send mail ( about 2 thousands ) . Yeah , i know there's another solution , but i still want to know clearly about this .
Even with set_time_limit(0) in a web page your script will still stop when Apache times out
I didn't notice about apache timeout , then there might be some problems.
I want to ask this question because i have a small script to send mail ( about 2 thousands ) . Yeah , i know there's another solution , but i still want to know clearly about this .
Don't try to send 2000 mails in one go is the upshot of it Batch them max 100 at a time.