Keep php script running?

I am wondering whether it’s possible to run a none-stop PHP script in dreamhost; mostly this script does nothing except someone sends a request. I hope this script running all the time.

Any one tell me about its possibility? Will it take much system resource? If it’s impossible, what about python and perl?

I don’t think it is possible, AFAIK it’s not permitted according to DH’s ToS - any script, be it php, python or perl. BUT I could be wrong. I asked support for something similar once (although that was for a binary program, not a script), and they said no - not on a shared environment. But try and ask support as well, if you haven’t done so already.

Like my help? Enter promo code 2FORME and you get the maximum off for your plan, minus 2$ - for me. :slight_smile:

If this script just hangs out waiting for someone to send it a request before it does something, why have it running as a persistent process?

I imagine you could just implement a standard php script or web service that only does something when needed. Got any more details about it?

if you want to create a “serverscript” in php you don’t need to keep it running all day and night long. It is more than enough to call the script by it’s url.

if the script needs to run a lot longer then the default execution time, you can use

so your script will time out after 5 minutes. Feel free to change the seconds :smiley:

Just a reminder: dreamhost takes heavy load scripts very seriously! rocks! (so does my site :))
link me

actually I want to host a python/php msn chat bot, which means, the bot should keep a persistent connection to the chat server and wait for message from the server. I dont think this script will consume a lot of system resources, for most of time it’s idle except the network connection.

i’m not sure but i think that such a thing is easier to make if you use the jabber stuff on your hosting in combination with php.
Don’t know if that is possible but i know that jabber can handle msn things, so it is a little bit reinventing the world if you can’t use it.

As you see, this post is not helpfull for your problem :slight_smile: it just points to alternatives rocks! (so does my site :))
link me