I know there's a lot of posts on this topic, but all solutions mentioned there don't seem to work for me.
I'm building a chat client and I want to keep a process running in the background, that will listen for incoming messages on my account.
Here's the code:
$command = "cd classes/chat/inc/ && /usr/bin/php5 client.php --mysql_server=localhost --mysql_username=root --mysql_password= --mysql_database=covide --gtalk_user=xxx --gtalk_password=xxx --user_id=".$_SESSION['user_id']." &> /dev/null &";
exec($command);
I've tried a lot of options instead of this:
&> /dev/null &
like > /dev/null 2>/dev/null & or > testoutput.php 2>&1 & echo $! (from various posts on this forum), but to no success. Does anyone have an idea on how this should be fixed?