PHP script running in background
I am relatively new to this. I am trying to run a PHP process in the background but as soon as I launch the process it stops. Here is the basic command:
php script.php &
The idea is to leave this script running all day, even after I logout, in which case it seems like I will go with something like this:
nohup php script.php &
I am on Ubuntu and the script is opening a stream to the Twitter Streaming API.
Any ideas or suggestions would be appreciated. Thanks!
-et
5 Replies
php script.php
Any logging in to to see if it's erroring or terminating naturally?
nohup php -q /path/to/script.php < /dev/null &
Thanks so much,
-et
Excellent! Again, thanks for the help.
-et