Page 1 of 1
Threading in php
Posted: Wed Apr 15, 2009 5:52 am
by achinthpaul
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
Re: Threading in php
Posted: Wed Apr 15, 2009 6:20 am
by it2051229
yeah like a page cannot run forever.. by default PHP executes 30 seconds only for a page and not forever.
Re: Threading in php
Posted: Wed Apr 15, 2009 9:09 am
by php_east
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
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.
Re: Threading in php
Posted: Thu Apr 16, 2009 6:25 am
by shiznatix
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.