Threading in php

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
achinthpaul
Forum Newbie
Posts: 4
Joined: Fri Mar 13, 2009 5:01 am

Threading in php

Post 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
User avatar
it2051229
Forum Contributor
Posts: 312
Joined: Tue Dec 25, 2007 8:34 pm

Re: Threading in php

Post by it2051229 »

yeah like a page cannot run forever.. by default PHP executes 30 seconds only for a page and not forever.
User avatar
php_east
Forum Contributor
Posts: 453
Joined: Sun Feb 22, 2009 1:31 pm
Location: Far Far East.

Re: Threading in php

Post 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.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Re: Threading in php

Post 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.
Post Reply