• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

duplicate and occasional dropped messages

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
3 posts • Page 1 of 1

Postby phreadom » Sun Jan 09, 2011 2:33 am

This is a continuation of the previous thread in the archived English help section.

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.
phreadom
Support Team
 
Posts: 13
Joined: Fri Apr 04, 2008 8:03 pm
Top

Postby re*s.t.a.r.s.*2 » Sun Jan 09, 2011 3:35 am

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.

Its seems very familiar to one we had when we used hostgator webhosting, your were there and then disconnect and then if typed something you would came back to life. We dropped the ball on them because Me and Another friend were having the plagued time out issue.. changed to VPS and every single issue is gone for good..
Last edited by re*s.t.a.r.s.*2 on Sun Jan 09, 2011 3:36 am, edited 1 time in total.
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby phreadom » Sun Jan 09, 2011 4:07 am

Well, we're looking to migrate hosts shortly, so maybe the problem will magically disappear at that point. :) Or at least be much less noticeable... it's so bad right now that for instance in "the game room" when using the quiz bot, you might see the score table repeat like 3 or 4 times... I even saw some messages repeating half a dozen times (6) etc. (and like the others said, refreshing the chat causes everything to go back to normal, and each message is only shown once as it should be)

I wish I understood the code better and could walk through and debug this... figure out the underlying code issue that's being brought to the surface in these instances.
phreadom
Support Team
 
Posts: 13
Joined: Fri Apr 04, 2008 8:03 pm
Top


Post a reply
3 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 3 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub