diff --git a/mod/chat/chatd.php b/mod/chat/chatd.php index 471c09af4a9..bb41bf9e8af 100755 --- a/mod/chat/chatd.php +++ b/mod/chat/chatd.php @@ -27,6 +27,8 @@ $_SERVER['PHP_SELF'] = 'dummy'; $_SERVER['SERVER_NAME'] = 'dummy'; $_SERVER['HTTP_USER_AGENT'] = 'dummy'; +$nomoodlecookie = true; + include('../../config.php'); include('lib.php'); @@ -42,6 +44,10 @@ if(!empty($safemode)) { die("Error: Cannot run with PHP safe_mode = On. Turn off safe_mode in php.ini.\n"); } +if(ini_get('allow_call_time_pass_reference') == '0') { + die("Error: Cannot run with PHP allow_call_time_pass_reference = Off. Turn on allow_call_time_pass_reference in php.ini.\n"); +} + @set_time_limit (0); set_magic_quotes_runtime(0); error_reporting(E_ALL); @@ -65,7 +71,7 @@ class ChatConnection { function ChatConnection($resource) { $this->handle = $resource; - socket_getpeername($this->handle, &$this->ip, &$this->port); + @socket_getpeername($this->handle, &$this->ip, &$this->port); } }