Error: Database connection failed. It is possible that the database is overloaded or otherwise not running properly. The site administrator should also check that the database details have been correctly specified in config.php |
Note that you may have more than one PHP installation on an OS X machine. The PHP that Apple ships with OS X may be somewhat out of date.
You can find out which php is running by typing (through a strange coincidence ):
which php
at the command line.
If the system responds with /usr/bin/php you're most likely getting the stock (and outdated) Apple PHP.
To use the newer PHP that you almost certainly installed along with Moodle, you need to specify the path. If you used the Marc Liyanage PHP package (from entropy.ch) you can use it by typing:
/usr/local/php/bin/php chatd.php --start &
at the command line.
There's also a PHP package from Server Logistics. I don't know where that one gets installed, offhand.
You can find out which php is running by typing (through a strange coincidence ):
which php
at the command line.
If the system responds with /usr/bin/php you're most likely getting the stock (and outdated) Apple PHP.
To use the newer PHP that you almost certainly installed along with Moodle, you need to specify the path. If you used the Marc Liyanage PHP package (from entropy.ch) you can use it by typing:
/usr/local/php/bin/php chatd.php --start &
at the command line.
There's also a PHP package from Server Logistics. I don't know where that one gets installed, offhand.
It works now-thanks. I had installed the Liyanage PHP5 so I have to type:
/usr/local/php5/bin/php chatd.php --start &
It gives some warnings on startup however. Do I have to worry about these?
David
[1] 1711
moodle:/Library/WebServer/Documents/moodle/mod/chat litadmin$ PHP Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of socket_getpeername(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /Library/WebServer/Documents/moodle/mod/chat/chatd.php on line 67
PHP Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of socket_getpeername(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /Library/WebServer/Documents/moodle/mod/chat/chatd.php on line 67
Moodle chat daemon v1.0 on PHP 5.0.3 ($Id: chatd.php,v 1.13.2.12 2005/04/01 05:33:21 martinlanghoff Exp $)
[2005-05-11 10:36:18] *IMPORTANT* Started Moodle chatd on port 9111, listening socket Resource id #21
/usr/local/php5/bin/php chatd.php --start &
It gives some warnings on startup however. Do I have to worry about these?
David
[1] 1711
moodle:/Library/WebServer/Documents/moodle/mod/chat litadmin$ PHP Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of socket_getpeername(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /Library/WebServer/Documents/moodle/mod/chat/chatd.php on line 67
PHP Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of socket_getpeername(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /Library/WebServer/Documents/moodle/mod/chat/chatd.php on line 67
Moodle chat daemon v1.0 on PHP 5.0.3 ($Id: chatd.php,v 1.13.2.12 2005/04/01 05:33:21 martinlanghoff Exp $)
[2005-05-11 10:36:18] *IMPORTANT* Started Moodle chatd on port 9111, listening socket Resource id #21
Strange thing that it would need PHP 5 to work:
moodle:...$ Moodle chat daemon v1.0 on PHP 4.3.10 ($Id: chatd.php,v 1.13.2.12 2005/04/01 05:33:21 martinlanghoff Exp $)
If your PHP version is not good enough, or if sockets are not enabled, chatd complains specifically. So the problem was neither of these.
As for the warnings, well, there is the problem of the experimental sockets extension (it's branded as such in the PHP docs)... we can't do anything about it except ignore it.
moodle:...$ Moodle chat daemon v1.0 on PHP 4.3.10 ($Id: chatd.php,v 1.13.2.12 2005/04/01 05:33:21 martinlanghoff Exp $)
If your PHP version is not good enough, or if sockets are not enabled, chatd complains specifically. So the problem was neither of these.
As for the warnings, well, there is the problem of the experimental sockets extension (it's branded as such in the PHP docs)... we can't do anything about it except ignore it.
I got this same message, and then it seems to have installed it. But then when I go to the chat room, all that appears is the box for my typing and the link to the help box. Nothing else appears. It's all white. I can type things, and hit enter, and it behaves like it is sending something, but nothing shows up. Any idea what is going on?
Hey, that's exactly what's happening to me!
Version 1.5 alpha, hosted server (webhost techie went in to my Settings and proclaimed my settings to be correct). Script runs fine from the command line with no errors; I just can't get any messages. Also, no list of Users in Chat appears either. Just white boxes, and a text entry box.
My course starts next week, so I'd really like to get this working soon.
Version 1.5 alpha, hosted server (webhost techie went in to my Settings and proclaimed my settings to be correct). Script runs fine from the command line with no errors; I just can't get any messages. Also, no list of Users in Chat appears either. Just white boxes, and a text entry box.
My course starts next week, so I'd really like to get this working soon.
I've submitted this as bug 3229. I should add that it doesn't seem to save these phantom chats either.
I should add that this is happening to me in 1.4.4
I was having this problem too. I'm not sure exactly what changed for it to start working, but here are some things to try:
Make sure you have the right server name and ip address listed in the settings for the quiz module.
Make sure the chatd server is running and that port 9111 is open. (Maybe a firewall blocking this port?)
I can get the same white boxes and text entry box when the chatd daemon is not running or is running with the wrong ip/server name.
HTH
Make sure you have the right server name and ip address listed in the settings for the quiz module.
Make sure the chatd server is running and that port 9111 is open. (Maybe a firewall blocking this port?)
I can get the same white boxes and text entry box when the chatd daemon is not running or is running with the wrong ip/server name.
HTH
The chat daemon is working OK for me on moodle.org .... http://moodle.org/mod/chat/view.php?id=524
(up for a short time only just as a demo)
(up for a short time only just as a demo)
I've run into the same "white screen" error that others mention...even when the chat daemon appears to work normally on the server.
I worked yesterday with Shane on this, and took some screenshots.
Although we suspected a firewall issue, I tested it on three machines in both Firefox and IE from behind our firewall, and from a direct satellite connection that was not proxy or firewall protected. I don't think Port 9111 was blocked on either one.
We were unsuccessful in getting to work correctly, and had to switch back to "normal" mode for our chat last evening.
Thanks in advance for any suggestions. I know there are great folks on this forum, as I am a regular lurker Hope this helps. Anyone else getting this?
Here is a screenshot. It just hangs here and status in Firefox reads "transferring...", and that's all it seems to do. Somtimes you can type a little and it appears to accept the input. Nothing changes in the GUI, however.
I worked yesterday with Shane on this, and took some screenshots.
Although we suspected a firewall issue, I tested it on three machines in both Firefox and IE from behind our firewall, and from a direct satellite connection that was not proxy or firewall protected. I don't think Port 9111 was blocked on either one.
We were unsuccessful in getting to work correctly, and had to switch back to "normal" mode for our chat last evening.
Thanks in advance for any suggestions. I know there are great folks on this forum, as I am a regular lurker Hope this helps. Anyone else getting this?
Here is a screenshot. It just hangs here and status in Firefox reads "transferring...", and that's all it seems to do. Somtimes you can type a little and it appears to accept the input. Nothing changes in the GUI, however.