• 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

Always disconnecting users

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

Post a reply
17 posts • Page 1 of 2 • 1, 2

Postby Colnect.com » Mon Aug 04, 2008 11:59 am

Since I've deployed phpFreeChat on my site I've never managed to get it work well.

On my site only registered members can use the chat and they're assigned their site's nick in the chat.
The chat does seem to work well for a few minutes but after some time of activity (or inactivity) the user will get "The chosen nickname is not allowed" and if trying to type a new message "You must be connected to send a message". Refreshing (F5) will connect the user back to the chat.

However, this does not allow for a chartroom to be successful.

Has this bug ever been resolved or has known fixes of any sort?

That's the link to the chat on my site:
http://telecards.colnect.com/content.php?r=chat

Thanks
Colnect collectors community
http://colnect.com
Colnect.com
Member
 
Posts: 18
Joined: Mon Mar 31, 2008 3:52 pm
  • Website
Top

Postby Colnect.com » Thu Aug 07, 2008 9:23 am

I've opened a bug for it on:
http://sourceforge.net/tracker/index.ph ... _id=158880
Colnect collectors community
http://colnect.com
Colnect.com
Member
 
Posts: 18
Joined: Mon Mar 31, 2008 3:52 pm
  • Website
Top

Postby phpfreechat » Thu Aug 07, 2008 3:08 pm

Did you try to increase the timeout parameter value ?
http://www.phpfreechat.net/parameters#timeout
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Colnect.com » Thu Aug 07, 2008 5:58 pm

Yes, I didn. Even set it for a few minutes but it still won't make any difference in the bug, just perhaps the time it took for it to eventually happen. Please tell me what else I could try and I shall.
Colnect collectors community
http://colnect.com
Colnect.com
Member
 
Posts: 18
Joined: Mon Mar 31, 2008 3:52 pm
  • Website
Top

Postby OldWolf » Thu Aug 07, 2008 6:13 pm

Did you rehash the chat after making the changes?
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby Colnect.com » Fri Aug 08, 2008 2:31 am

Yes, I did /rehash and got the correct "Configuration has been rehashed".
The behavior I'm describing doesn't seem to be a correct one even had the user timed out...
Colnect collectors community
http://colnect.com
Colnect.com
Member
 
Posts: 18
Joined: Mon Mar 31, 2008 3:52 pm
  • Website
Top

Postby Colnect.com » Tue Aug 26, 2008 8:15 am

Any more ideas? Though I have phpFreeChat on my website it's unusable so even though it's cool I'll have to remove it if I can't find a solution.
Colnect collectors community
http://colnect.com
Colnect.com
Member
 
Posts: 18
Joined: Mon Mar 31, 2008 3:52 pm
  • Website
Top

Postby OldWolf » Tue Aug 26, 2008 9:09 pm

Are you using the most recent release of the chat? I couldn't even load the chat on IE.
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby Colnect.com » Tue Aug 26, 2008 9:27 pm

Yes, I'm using the latest version (it acts the same with the new version as it did with the previous one). Only registered members on my site can use the chat. I find it hard to believe that my site is the only phpFreeChat site on which it doesn't work well. I can send the PHP script used for configuring it or any other info needed.
Colnect collectors community
http://colnect.com
Colnect.com
Member
 
Posts: 18
Joined: Mon Mar 31, 2008 3:52 pm
  • Website
Top

Postby OldWolf » Wed Aug 27, 2008 2:13 am

I'm aware that only registered users can use the chat, I received a javascript error which was what prevented the chat from loading...

I ask about the new version, because the JS error is like that of an old version we used to have a bug with. But if you're using version 1.2, it's not that.

While you may find it hard to believe, something must be wrong with your code/parameters, because the chat functions perfectly both on my server and the official demo. I will need to see the page's code to help you further.
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby Colnect.com » Wed Aug 27, 2008 7:57 am

Thank you for checking it out. The chat does load and seems to function properly. The issue is user disconnections so you can't stay on the chat for more than few minutes before getting disconnected.

Below you'll find the relevant code. Let me know if some of the custom functions used need explanation. One issue that might interest you is that I'm using output buffering in PHP to catch all errors (this code is not here).

Here's my chat.php file:
Code: Select all
<?php
require_once "Includes.php";

require_once INCLUDE_DIR."PageInit.php";

/**
 * return phpFreeChat language code relevant to current session language
 *
 * @return unknown
 */
function get_phpfreechat_language() {   
   $arLangCodeConversion = array(
      6 => 'ar_LB', # Arabic   AR
      18 => 'bg_BG', # Bulgarian   BG
      23 => 'zh_CN', # Chinese   ZH
      25 => 'hr_HR', # Croatian   HR
      26 => '', # !!!Czech   CS
      28 => 'nl_NL', # Dutch   NL
      34 => '', # !!!Finnish   FI
      35 => 'fr_FR', # French   FR
      39 => 'de_DE-informal', # German   DE
      40 => 'el_GR', # Greek   EL
      45 => '', # !!!Hebrew   HE
      47 => 'hu_HU', # Hungarian   HU
      55 => 'it_IT', # Italian   IT
      64 => 'ko_KR', # Korean   KO
      88 => 'pl_PL', # Polish   PL
      89 => 'pt_BR', # Portuguese   PT
      93 => '', # !!!Romanian   RO
      94 => 'ru_RU', # Russian   RU
      108 => '', # !!!Slovenian   SL
      110 => 'es_ES', # Spanish   ES
      113 => 'sv_SE', # Swedish   SV
      119 => 'th_TH', # Thai   TH
      124 => 'tr_TR', # Turkish   TR
   
      );
   if (!($code = $arLangCodeConversion[$_SESSION['language']])) $code = '';   
   return $code;
}

$userID = session::UserMustBeLoggedIn();
PrependPageTitle('Chat');
PrependPageMetaDescription('Join the online collectors chat of colnect');

require_once "chat/src/phpfreechat.class.php"; // adjust to your own path

$params["serverid"] = md5(__FILE__); // used to identify the chat
$params["language"] = get_phpfreechat_language();
$params["title"]          = "Please be polite - happy collecting :)";
$params["nick"]           = $_SESSION['user']->login;  // setup the intitial nickname
$params["frozen_nick"]    = true;     // do not allow to change the nickname
$params["shownotice"]     = 2;        // 0 = nothing, 1 = just nickname changes, 2 = connect/quit, 3 = nick + connect/quit
$params["max_nick_len"]   = 30;       // nickname length could not be longer
$params["max_text_len"]   = 400;      // a message cannot be longer
$params["max_channels"]   = 5;        // limit the number of joined channels tab
$params["max_privmsg"]    = 3;        // limit the number of private message tab
//$params["refresh_delay"]= 2000;     // chat refresh speed in msec
$params["timeout"]       = 60000;// timeout
$params["max_msg"]        = 20;       // max message in the history (message seen when reloading the chat)
$params["height"]         = "400px";  // height of chat area
$params["debug"]          = false;    // activate debug console
$params["connect_at_startup"] = true;
$params["start_minimized"]    = false;
$params["nickmarker"]     = true;
$params["clock"]          = true;
$params["isadmin"]          = $_SESSION['user']->is_webmaster();
$params["channels"]          = array('Phone Cards Chat');
$params["frozen_channels"] = $params["channels"];
#privmsg
#focus_on_connect
$params["display_ping"]    = false;
$params["displaytabclosebutton"]    = false;
$params["btn_sh_whosonline"] = false;



$params["dyn_params"]          = array('language');


$params["container_type"] = "mysql";
$params["container_cfg_mysql_host"]     = DB_SERVER;        // default value is "localhost"
#$params["container_cfg_mysql_port"]     = 3306;            // default value is 3306
$params["container_cfg_mysql_database"] = DB_CHAT_DATABASE; // default value is "phpfreechat"
$params["container_cfg_mysql_table"]    = "phpfreechat2";          // default value is "phpfreechat"
$params["container_cfg_mysql_username"] = DB_CHAT_USER;      // default value is "root"
$params["container_cfg_mysql_password"] = DB_CHAT_PASSWORD; // default value is ""
#$params["container_type"]         = "File";
#$params["container_cfg_chat_dir"] = TEMP_DIR."chat.now";



$chat = new phpFreeChat($params);

// display it
$smarty->assign('chat', $chat);
$smarty->display(TEMPLATE_DIR.'chat.tpl');

and this is the Smarty template file:
Code: Select all
{strip}{include file=header.tpl}

{include file=top_menu.tpl}

<div dir="ltr">
{$chat->printChat()}
<div>

{include file=footer.tpl}{/strip}
Last edited by Colnect.com on Wed Aug 27, 2008 7:58 am, edited 1 time in total.
Colnect collectors community
http://colnect.com
Colnect.com
Member
 
Posts: 18
Joined: Mon Mar 31, 2008 3:52 pm
  • Website
Top

Postby OldWolf » Wed Aug 27, 2008 10:35 pm

No, the chat does NOT load and function properly, as I attempted to explain to you. I've attempted connection from both IE and firefox, with a freeze on the chat loading screen and a javascript error. Perhaps you should try logging in from a user level account (mine is test, password testtest), and see if you can work out this error first. It's hard to see the other problem if I can't even get in. :/
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby Colnect.com » Thu Aug 28, 2008 12:42 am

I've now fixed that issue you were experiencing though I believe there's still a phpFreeChat bug there that has to do with the `lang` parameter.
IMHO, the problem is that phpFreeChat keeps doing the post in the same language though the language has been changed. So even if it's set to load with Spanish, it still keeps posting with lang=he. FireBug shows that the Ajax is calling:
http://telecards.colnect.com/es/chat.php?lang=he
Do mind that phpFreeChat has successfully loaded the Spanish language (all hints are Spanish) but the POSTs still have lang=he.

The reason you couldn't connect is because I configured my apache to translate language urls from:
http://telecards.colnect.com/es/chat.php?lang=he
to
http://telecards.colnect.com/chat.php?lang=he&lang=es

I've now changed the parameter name I'm using so it doesn't interfere with phpFreeChat's usage of the lang parameter (though I advise you use another name since phpFreeChat is many times embedded in other pages).

My test user, teleawe, is now left in the chat room. Let's see if he makes it through the night :)
Colnect collectors community
http://colnect.com
Colnect.com
Member
 
Posts: 18
Joined: Mon Mar 31, 2008 3:52 pm
  • Website
Top

Postby Colnect.com » Thu Aug 28, 2008 7:28 am

The errors for which I started the post are still occurring the same way :(
Colnect collectors community
http://colnect.com
Colnect.com
Member
 
Posts: 18
Joined: Mon Mar 31, 2008 3:52 pm
  • Website
Top

Postby aqualad » Tue Oct 28, 2008 8:26 pm

I'm actually observing the same behaviour, with phpFreeChat in a drupal site. i've just upgraded to v1.2, and i see this time-out behaviour in chats open in Safari (for Windows), Chrome, FireFox, and IE7. It's as if the activity somehow isn't registering, and eventually the "Your must be connected to send a message." message appears.
aqualad
New member
 
Posts: 1
Joined: Tue Oct 28, 2008 7:45 pm
Location: Toronto, Canada
  • Website
Top

Next

Post a reply
17 posts • Page 1 of 2 • 1, 2

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 6 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