Chatdaemon and PHP

Chatdaemon and PHP

by Thomas Speck -
Number of replies: 4
I have some problems getting the daemon to run on my server (a trustix 2.2 system). The errors i get are:

root@hyper1 /home/www/moodle/mod/chat# 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 [runtime function name]().  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 /home/www/moodle/mod/chat/chatd.php on line 68
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 [runtime function name]().  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 /home/www/moodle/mod/chat/chatd.php on line 68
Moodle chat daemon v1.0 on PHP 5.0.4 ($Id: chatd.php,v 1.29 2005/04/01 05:55:10 martinlanghoff Exp $)

PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/www/moodle/mod/chat/chatd.php:20) in /home/www/moodle/lib/setup.php on line 284
Error: Function socket_setopt() does not exist.
Possibly PHP has not been compiled with --enable-sockets.

I have recompiled PHP to enable sockets but still get the same error. Is there a way to test if the compiling did work? And is there a recommended version of PHP to use?
Average of ratings: -
In reply to Thomas Speck

Re: Chatdaemon and PHP

by John Papaioannou -
Hi!

First of all, I just made some improvements to chatd which should eliminate all those irrelevant warnings you get in the beginning, as they are either harmless or cannot be avoided.

As for testing for sockets, the check done by chatd should be regarded as definite. You can try doing phpinfo(); and looking at the compilation options (should be mentioned near the top) for "--enable-sockets" or further down for a "sockets" header (in the alphabetical list of extensions).
In reply to John Papaioannou

Re: Chatdaemon and PHP

by Thomas Speck -
Thanks for your answer, I got the Daemon to run now smile

Problem was that I forgot to install the newly compiled package (I thought it would do that itself). It runs now, but I still get one Error (I guess this is the one you said was removed):

Moodle chat daemon v1.0 on PHP 5.0.4 ($Id: chatd.php,v 1.29 2005/04/01 05:55:10 martinlanghoff Exp $)

PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/www/moodle/mod/chat/chatd.php:20) in /home/www/moodle/lib/setup.php on line 284
[2005-07-08 14:37:15] *IMPORTANT* Started Moodle chatd on port 9111, listening socket Resource id #21

That one aside, all seems to run fine now (now forward to the real tests with real users wink)
In reply to Thomas Speck

Re: Chatdaemon and PHP

by John Papaioannou -
You didn't allow enough time for the very latest version to reach the public repository. "v 1.29 2005/04/01" obviously doesn't inlcude yesterday's changes. wink
In reply to John Papaioannou

Re: Chatdaemon and PHP

by James Dugal -
Jon, I just started chatd for my moodle site, and I get similar complaints  with the
chatd in 1.5.2+ from 1 Aug 2005 tarball.:

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, f
uture versions may not support this any longer.  in /opt/web/docs/moodle/mod/cha
t/chatd.php on line 74   [two of these]
Moodle chat daemon v1.0 on PHP 4.3.11 ($Id: chatd.php,v 1.29.2.1 2005/07/08 03:5
0:30 defacer Exp $)

This is under Solaris, with PHP 4.3.11 and Turck-mmcache  2.4.6.