Run a PHP script as a service/daemon using start-stop-daemon

In a recent project I needed to permanently run a PHP CLI script; it needed to run as a service/daemon. A few Google search coupons later I got my answer: use start-stop-daemon to make it work. To not manually type in those lengthy commands it’s possible to wrap these in a handy little script, as …

PHP is meant to die

PHP is meant to die. It doesn’t mean that it will disappear into nothingness, it just means that your PHP code can’t run forever; The core PHP feature follows the most simple programming workflow: get input data, process it, display the output, and die. … If you want to keep [PHP] processes running forever they …