http://www.phpfreechat.net/forum/viewtopic.php?id=4207
I'm seeing the same problem on a pfc-1.3 install in a drupal site: http://thejapanesepage.com/chat (requires login, sorry)
I was looking through the source and changelog for http://www.jpfchat.com/ , and there appear to be changes that claim to prevent duplicate messages... I'm wondering if this relates to the same duplicate messages problem a few of us seem to be seeing?
From the history.txt file that comes with it...
- Code: Select all
11/28/09 v2.1.0
--------------------------------------
updated handling of xml requests to improve performance and eliminate possible duplicates.
altered pfclient.js to remove possibility of duplicate messages
We're also experiencing the same kinds of user disconnects even if the user just typed something... saying they timed out. Sometimes it happens after literally a few seconds... and sometimes it can be fine for hours, or even stay connected overnight while the user sleeps etc. But it's a real frustration when users are sitting actively chatting just fine and suddenly they're disconnected saying they timed out.
- Code: Select all
Support Template
PFC Version: 1.3
PHP Version: 5.1.6
Shared or Dedicated Hosting: rackspace dedicated host.
Link to your website: http://thejapanesepage.com/chat (requires login)
Are you able to reproduce the issue on the official demo (http://www.phpfreechat.net/demo)? -- No.
Have you set any parameters?
If so, please include your entire code, using the [code ] and[/code ] tags (without the space).
What is the issue you are experiencing in detail? -- See above message.
Are you seeing any error messages, such as javascript errors? -- No.
Page code (this is the node-chat.tpl.php file I created to use as the "chat" content type in Drupal):
- Code: Select all
<?php
require_once ($_SERVER["DOCUMENT_ROOT"] . "/phpfreechat-1.3/src/phpfreechat.class.php");
$phpEx = 'php';
// Initialize $params array (must do this BEFORE you set all the stuff or you wipe it all. OOPS!)
$params = array();
global $user;
//get_username_string ;
$oog = $user->name;
if ($user->uid == '0'){
$chatloginredirect = '/forum/ucp.'. $phpEx .'?mode=login&redirect=/chat/';
header("Location: " . $chatloginredirect);
} else {
// since we're running utf-8 already, we don't need this next line.
// if you're not running utf-8, you need this line.
// $params["nick"] = iconv("ISO-8859-1", "UTF-8", $oog);
$params["nick"] = $oog;
// Check users role to see if they get admin access (3 = administrator, 4 = moderator, 5 = tech)
if ($user->roles[3] || $user->roles[4] || $user->roles[5]){
$params["isadmin"] = true;
} else {
$params["isadmin"] = false;
}
}
$params['theme'] = 'tjp';
$params['admins'] = array('admin' => '*****',);
$params["max_msg"] = 24;
$params["max_displayed_lines"] = 100;
$params["frozen_nick"] = true;
$params["channels"] = array("The Lounge","The Game Room",);
$params["max_channels"] = 6;
$params["max_nick_len"] = 20;
$params["timeout"] = 300000;
$params["refresh_delay"] = 1000;
$params["post_proxies"] = array("quiz");
$params["skip_proxies"] = array();
$params["time_offset"] = ($user->timezone + 21600);
$params["title"] = 'Welcome to the webchat. Webchatへようこそ!';
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["debug"] = false;
$params["showsmileys"] = false;
$chat = new phpFreeChat( $params );
?>
<div class="node<?php if ($sticky) { print " sticky"; } ?><?php if (!$status) { print " node-unpublished"; } ?>">
<?php if ($picture) { print $picture; }?>
<?php if ($page == 0) { ?>
<?php if ($title) { ?>
<h2 class="title"><a href="<?php print $node_url?>"><?php print $title?></a></h2>
<?php }; ?>
<?php }; ?>
<?php if ($terms) { ?>
<span class="submitted"><?php print $submitted?></span> <span class="taxonomy"><?php print $terms?></span>
<?php }; ?>
<div class="content">
<?php print $content?>
<?php $chat->printChat(); ?> <!-- this code added for chat box displaying -->
</div>
<div class="clear-block clear"></div>
<?php if ($links): ?>
<div class="links"><?php print $links; ?></div>
<?php endif; ?>
</div>
I need to update PHP in order to implement the latest memcache, so I'll be able to see if that has an effect on things. Other than that, all I can think of doing is removing it from Drupal... but I can see the same symptoms on my PHPBB linked PFC chat as well, although to a much lesser extent... so I don't think it's necessarily Drupal's fault, but perhaps the # of users, higher pings, using a database for session storage rather than the filesystem, etc.