I'm showing up more then once

Forum
Last Post
Threads / Messages

AlkseeyaKC

Member
Member
Joined
Jan 12, 2009
Messages
73
Points
6
Age
40
Location
Planet Kalzy
Mysidian Dollar
6,083
http://neon.planetkalzy.com/

When I'm logged in, It shows I'm logged in twice on the online list. and just today its reading me three times now. Its only doing this to my account. I don't know what could be causing this. O - o; Maybe someone has an Idea? ^_^;
 
umm this is interesting, it only happens to your account but not with others? Theres a chance that you opened multiple whos online pages in your webbrowser. I am sure theres a way to fix this, which can be done easily.
 
There is a quick way to produce this. Login using 2 browsers then go to the online list.

You will be there twice.
 
I get it when I just visit the page sometimes. XD; I have not had it happen for a while. Maybe I had more then one tab open and that caused that some how.
 
Maybe add an if/else statement.

something like:

if username = username
show once?
 
Well I am offering one possible solution, not sure if it works since I have never encountered this glitch myself on demo site(makes sense though, there is usually only me on demo site).

Go to your inc/functions.php file and find this:

PHP:
if($isloggedin != "yes")

{

    $loggedinname = "Visitor";

}



$result = runquery("SELECT * FROM ".$GLOBALS['prefix']."online WHERE `session` = '".$session."'");

$count = mysql_num_rows($result);

if($count == 0)

{

    runquery("INSERT INTO ".$GLOBALS['prefix']."online VALUES('$loggedinname', '$session', '$time')");

}
Replace with:
PHP:
$result = runquery("SELECT * FROM {$GLOBALS['prefix']}online WHERE `session` = '{$session}'");

$count = mysql_num_rows($result);

$result2 = runquery("SELECT * FROM {$GLOBALS['prefix']}online WHERE `username` = '{$loggedinname}'");

$count2 = mysql_num_rows($result2);

if($isloggedin != "yes")

{

    $loggedinname = "Visitor";

}

if($count == 0 and $count2 == 0)

{

    runquery("INSERT INTO {$GLOBALS['prefix']}online VALUES('$loggedinname', '$session', '$time')");

}
This way it should fix the problem of same user appearing more than once from who's online page. Again I cant tested this myself with only me on demo site, so run it on your active site with members and see if it works. It will not be included in Mys v1.2.3, so Id recommend you to upgrade before fixing this.
 
K I tried it so I'll let you know how it works... about upgrading....

If I'm going to lose all my edits I may not upgrade. I have probably made over 100 if not more edits to my scripts.
 
Oh alright, this is up to you. The reason why I do not want to include who's online bug fix in Mys v1.2.3 is that I personally have no idea if it works. Incase you can stay up a bit, try the code on your site to see if it fixes the glitch. Once confirmed, I may end up fixing this glitch in Mys v1.2.3 prior to its official release.
 
Yea I'll be up awhile. But what I meant was if I'm gonna lose all my custom edits then I may not upgrade =)
 
Oh I see. Well in Mys v1.2.3 the user passwords are encrypted with advanced approach to generate a hash of 128 characters rather than 32. It is far more secure under this hash generator, but I can definitely provide you with the password updater if you do not wish to upgrade to Mys v1.2.3 directly.

So yeah, please try the code on your site and see if it fixes the glitch with online.php.
 
That would be great HOF, thank you =) I'm pretty sure it's working like a charm which is amazingly wonderful =) *cookies for you*
 
You are very welcome. ^^ Actually it was my fault not realizing that this script had security issues when I took over its development. Hopefully the password encrupter will prove to be useful.

And sorry to repeat this again, would you mind testing the who's online code on your site and see if it fixes the glitch you had before?
 
LoL... i DID!! that's why i said this:

I'm pretty sure it's working like a charm which is amazingly wonderful =) *cookies for you*

sorry i wasn't more clear >.<
 
lol sorry, I thought you were referring to the user password encrypter. I will add online.php fix for Mys v1.2.3 now that you have confirmed the code works. Lemme know quickly if you spot anything wrong with the code since I do not wish to present the public with a glitchy script.
 
Will do... I keep checking it constantly but I'm sure by now it would have shown multiples of one user! Totally loving it!
 
Well yeah. I checked your site before, but I never encountered such a glitch. It also never occurred to me on my demo site, you know how hard it is to track a bug reported by other users if you cannot get it yourself.
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,278
Messages
33,127
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top