I am trying to put chat running whith daemon but it only works when I run it in foreground.
Something like this:
1. php --chatd.php --start &
It starts the daemon but chat on Moodle does not work.
Daemon runs in foreground and I can see the daemon's message saying it is running ok and chat in Moodle works!
Everytime I put the daemon in background, it stops working in Moodle.
I am using Moodle 1.9.5 downloaded today.
Can someone tell me how can I put the daemon working in background AND in Moodle at the same time?
Thanks in advance,
I have the same problem. When I run this the chat works fine:
/usr/bin/php /var/www/moodle/mod/chat/chatd.php --start -v -l /var/log/chatd.log
but if I try to run in background it doesn't work:
/usr/bin/php /var/www/moodle/mod/chat/chatd.php --start -v -l /var/log/chatd.log &
I have Moodle 2.5.2 in CentOS.
I found the solution! This is my batch file:
cd /var/www/moodle/mod/chat/ && /usr/bin/php chatd.php --start -l /var/log/chatd.log > /dev/null &