• 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

2 users with the same session

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

Post a reply
3 posts • Page 1 of 1

Postby Hello2u » Wed Aug 15, 2012 6:56 am

PFC Version: 1.4
PHP Version: 4. something, details here: http://hubs.konata.ca/phpinfo.php

Shared or Dedicated Hosting: Shared
Link to your website: http://hubs.konata.ca/

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).

Here it is, though I _highly_ doubt it has an impact on the bug.
Code: Select all
$params = array();
$params["title"] = "Game Hubs";
if (isset($_COOKIE["nick"])) $params["nick"] = $_COOKIE["nick"];

if (isset($_COOKIE["fc"])) $params["nickmeta"] = array('fc'=>$_COOKIE["fc"],'id'=>$_COOKIE["id"],'avatar'=>$_COOKIE["avatar"]);
if (isset($_GET["fc"])) $params["nickmeta"] = array('fc'=>$_GET['fc']);
$params['firstisadmin'] = false;

$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
if (!isset($_GET["channels"]))
{
  $params["channels"] = array('Main');
}
else
{
  $params["channels"] = array('Main',$_GET['channels']);
}
$params["debug"] = false;
$params["nickmarker"] = false;
$chat = new phpFreeChat( $params );

What is the issue you are experiencing in detail?

I've been modifying my install of PHPFreeChat for a few months now, with about 3 people helping me test. Today I spread the link and had roughly 7 people join in the span of 10 minutes (these are estimates). However, we only had about 3 nicks join, and 2 turned out to be controlled by two people at once. (I know the math doesn't add up, my estimations are off, and there were 3 people in there already, plus people leaving)

So person_a would join, then change names to person_b. Person_b was taking commands form person_a and person_b at once. Person_c joined and changed to person_d. Person_c was taking commands from person_c and person_d at the same time. It was all very confusing.

My best guess is that this was caused by the people joining the room at roughly the same time, and being assigned the same session variable. How can I troubleshoot and fix this?

Are you seeing any error messages, such as javascript errors? No
Last edited by Hello2u on Wed Aug 15, 2012 7:12 am, edited 1 time in total.
Hello2u
New member
 
Posts: 2
Joined: Wed Aug 15, 2012 6:47 am
Top

Postby re*s.t.a.r.s.*2 » Wed Aug 15, 2012 2:30 pm

Ok,

first off use session maybe that could fix the issue also is know that this chat has issues with GET method.. so as suggested try session and see if that make a different..

regards.
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 Hello2u » Wed Aug 15, 2012 4:35 pm

Ok, I'll replace it, but I don't think that's the problem because all the GETs are replaced by cookies. I just left them in as a fallback option, so the code would be executed, but there's no information to be fetched.

Here's the changed version:
Code: Select all
$params = array();
$params["title"] = "Game Hubs";
if (isset($_SESSION["nick"])) $params["nick"] = $_SESSION["nick"];

if (isset($_COOKIE["fc"])) $params["nickmeta"] = array('fc'=>$_COOKIE["fc"],'id'=>$_COOKIE["id"],'avatar'=>$_COOKIE["avatar"]);
if (isset($_SESSION["fc"])) $params["nickmeta"] = array('fc'=>$_SESSION['fc']);
$params['firstisadmin'] = false;
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
if (!isset($_SESSION["channels"]))
{
  $params["channels"] = array('Main');
}
else
{
  $params["channels"] = array('Main',$_SESSION['channels']);
}
$params["debug"] = false;
$params["nickmarker"] = false;
$chat = new phpFreeChat( $params );

Edit: After I made the changes, it happened again. so it's not fixed.

14:45:43 * CMS YELLOW joins Main
14:47:47 * CMS YELLOW changes nickname to RPG GAMER*
14:49:10 * RPG GAMER* changes nickname to CMS YELLOW
14:49:51 ‹CMS YELLOW› W'sup guys, it's Bman
14:49:59 ‹Hello2u› uhh
14:50:05 ‹CMS YELLOW› Where would we be without you *cheers*
14:50:10 ‹Hello2u› bman, did you change your name to CMS YELLOW?
14:50:21 ‹CMS YELLOW› nope
14:50:29 ‹Hello2u› ...
14:50:40 ‹CMS YELLOW› Change your name Bman
14:50:40 ‹Hello2u› Looks like the bug is still there then
14:50:59 ‹Hello2u› both of you guys close your browser and reopen it
14:51:00 ‹CMS YELLOW› Click on your name next to the text box
14:51:04 ‹CMS YELLOW› k
14:52:07 * CMSYELLOW joins Main
14:56:23 * CMS YELLOW changes nickname to BmanNintendo
Last edited by Hello2u on Wed Aug 15, 2012 7:57 pm, edited 1 time in total.
Hello2u
New member
 
Posts: 2
Joined: Wed Aug 15, 2012 6:47 am
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 9 guests

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