Problems with chat daemon (continued)

Problems with chat daemon (continued)

by Ralf Seliger -
Number of replies: 2
Hi again,

one of the first things to happen when moodle starts is the following call to PHP-function mysql_connect in file lib/adodb/drivers/adodb-mysql.inc.php:

$this->_connectionID = mysql_connect($argHostname, ...);

Now, when moodle is started from a browser this function call completes without any problems, of course.

The very same function call occurs when the chat daemon is started via

php chatd.php --start &

from the command line. In that case, however, the function mysql_connect does not return. It just blocks. There is no connection ID, no false, no error message, just nothing. The function mysql_connect just never completes execution. And yes, I have waited longer than the mysql.connect_timeout which is 60 seconds on my server.

Has anybody oberved this behaviour with mysql_connect before?

Regards
Ralf Seliger
Average of ratings: -
In reply to Ralf Seliger

Re: Problems with chat daemon (continued)

by Ken Wilson -

Ralf

One thing to check is that the php cli executable file has been compiled with the mysql module. Do you see mysql listed in the modules section when you run "php -m"?

Ken

In reply to Ken Wilson

Re: Problems with chat daemon (continued)

by Ralf Seliger -
Hi Ken,

thanks for answering.

The problem was that php chatd.php --start & calls the PHP4 executable on my server. Executing php5 chatd.php --start & works just fine.

Either the PHP4 executable is a remainder from the somehow unfinished upgrade to PHP5 or the PHP4 executable was not compiled with the mysql module while the PHP5 executable was.

Regards, Ralf