1. Run chatd without typing the ampersand(&) at the end of the command line. This will cause it to run in the foreground, so you will see all of the messages on your terminal. When you want to stop it, hit CTRL+C.
2. Run chatd with the -l option. This will cause it to log everything in the file chatd.log, which will be created in the same directory that chatd.php is in. You will need to have write permissions for that directory, but this will almost certainly be the case by default.
In any case, you can also try the -v (verbose) option along with -l. This will cause chatd to output a lot more debugging information.
So the command line would look something like
./chatd.php --start -v -l
PS: If you just type "./chatd.php" without any parameters you 'll get a short help screen mentioning the above.
I've set that up now on a live session.
In the meantime, just a couple of questions:
1. When I try to kill a chatd session that was started with the &, eg use ps aux|grep php to get the process id, then kill 2715, it does not release the port, and I have to use another port, or reboot (gasp!!). The process id is gone, eg if I try kill again. What to do?
2. Does the chat daemon work for all chat rooms on one website, or can it be used for all chat rooms on all domains on one server?
3. The problem we have is with a client who uses the chat room with a classroom of children in remote locations. As a result I think our problem is mainly to do with the wuality of their connections, and the chat roooms freeze up from time to time. In practice I'm sure their connection is broken (already the log from above shows one such disconnection). Do you see an elegant way to make the system "self heal", ie automagically reconnect unless "told" not to?
2. One site only.
3. I don't quite understand what you are experiencing... if someone's connection just drops (e.g. dialup failure) then chatd is supposed to detect and remove that user after a while. You can test that by opening two different browsers (Firefox, IE), connecting to the same chat room, and killing one of them. The other one should see chatd saying "has left the chat room".
By saying "automagically reconnect", you mean e.g. my connection drops -> I 'm booted out of the chatroom, then I dial up again -> the chat window reenters the chatroom again? That would be.... maybe technically feasible, but definitely very hard to get correctly.
Remember also that the quality of some piece of software depends on how easily the developers can debug it. Dropping your connection to the outside world and bringing it up again would be... quite an unpleasant drill for anyone.
The "automagically reconnect" was meant to be a client side feature ... since this module is great for 'distance learning" and some of the people at a distance have this problem. Anyway I understand the issue, and will do some more research before asking any more.
I had problems until I put the external IP address in ...
Thanks for bringing it up, James.
It is now working great and very very fast - thanks!
One thing I noticed though - the text box where you enter your chat is only partially showing. How do I readjust the page so the text box is obvious and easy to type into. At the moment, although the text goes in just fine, only the top half of the box can be seen. This is not the case if I use non daemon chat.