marko's blog

So you have a php script you wish to keep running forever

Create bash file -


ps aux | grep '[d]aemon.php'

if [ $? -ne 0 ]


    php /home/acct/public_html/daemon.php


Create a cron job for every minute

* * * * * /bin/sh

or run it this way on CLI: 
nohup /bin/sh &

But when the system reboots, it is gone

The best way to start is to do this: sudo port list sudo port selfupdate sudo port search --name --glob 'php*'Check amongst this out for the version that supports your php.sudo port install php**-intl