Hi All,
Is there threading concept in php .I want to run a program in background and it should run continuously.
Thanks and Regards,
Paul
Threading in php
Moderator: General Moderators
Re: Threading in php
yeah like a page cannot run forever.. by default PHP executes 30 seconds only for a page and not forever.
Re: Threading in php
if you use windows just disable timeout and run in a command shell. PHP is single threaded meaning you are confined to one script. but you can run it forever, set timeout = 0. it is a little heavy so you may need to do load balancing but i haven't had to bother.achinthpaul wrote:Hi All,
Is there threading concept in php .I want to run a program in background and it should run continuously.Thanks and Regards,
Paul
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
Re: Threading in php
If you want it to run forever and whatnot, PHP is just not the language you want to use. Look into thinkgs like python or java or c or c++, these are better for this than PHP is. It is just not what PHP was designed for.