I need to run a php script as daemon process (wait for instructions and do stuff). cron job will not do it for me because actions need to be taken as soon as instruction arr
You could start your php script from the command line (i.e. bash) by using
nohup php myscript.php &
the &
puts your process in the background.
Edit:
Yes, there are some drawbacks, but not possible to control? That's just wrong.
A simple kill processid
will stop it. And it's still the best and simplest solution.