I'm programming a website where I want a daemon to be executed when the user click on "execute the background programm". For this, I've developped it with the symfony2 php framework.
For the moment, when I click on the link to execute the daemon, it blocks all the whole website and I can't click other links of my website because the web browser is like searching the page during the execution of the daemon writing "Connexion" as title of the internet page.
My php daemon is written like that :
<?php
while(true) {
//code
sleep(2);
}
?>
And when I click on the link "execute the background programm", it runs this command :
shell_exec('nohup php /my/daemon/daemon.php &');
Is there a way to run a php daemon without have the "Connexion" status during the execution of my daemon which blocks my website ?
Thanks !