RevCMS - Online Players Bug

Blasteh

Lord Farquaad
Apr 3, 2013
1,151
513
Hello RZ,
When I first setup this CMS, it was displaying players online, now it's not for some reason. Yes, the emulator is running and I am online. (I'm using Sledmores Plus Emulator, with the latest Database, swfs, etc)

You must be registered for see images attach


Any fix?
 

Modo

blame it on my asd
May 27, 2013
137
42
{online} grabs the info from server_status table, problem is PlusEMU does not send anything to that table. I'm sure there is an easier way that this but what I did was made a PHP file called online.php
PHP:
<?php
    $con = mysql_connect("localhost","root","password");
    mysql_select_db("newdb", $con);

    $q = mysql_query("select online, count(*) from users group by online;");
    $row = mysql_fetch_assoc($q);
    echo $row['online'];
?>
 

Blasteh

Lord Farquaad
Apr 3, 2013
1,151
513
can you pm or skype them please if they are working please?
Use google...
The mysql query might be wrong, post it here and I'll check it for you.
Where do I find that?
{online} grabs the info from server_status table, problem is PlusEMU does not send anything to that table. I'm sure there is an easier way that this but what I did was made a PHP file called online.php
PHP:
<?php
    $con = mysql_connect("localhost","root","password");
    mysql_select_db("newdb", $con);

    $q = mysql_query("select online, count(*) from users group by online;");
    $row = mysql_fetch_assoc($q);
    echo $row['online'];
?>
Where would I put this? Just create a online.php?

Edit: Not sure if this is a factor or not, but in server_status, when players are online, it doesn't update when I refresh the database.
You must be registered for see images attach
 
Last edited:

Zac

echo "Graphic Designer";
Feb 13, 2015
90
6
PlusEMU does send information to the server_status table to be able to grab the {online} but you're just using the wrong database. Download the boon.sql from this link; and then add {online} to your header/pages.
 

Blasteh

Lord Farquaad
Apr 3, 2013
1,151
513
PlusEMU does send information to the server_status table to be able to grab the {online} but you're just using the wrong database. Download the boon.sql from this link; and then add {online} to your header/pages.
Will this overwrite any data? And to clear things up, it was working at first, then suddenly just stopped working. So there's nothing really wrong with my database, it's the database that Sledmore provided with his Emulator.
 
Last edited:

Zac

echo "Graphic Designer";
Feb 13, 2015
90
6
I would just create a new database and then test it that way. If it shows the amount of users online then you know that it was your old database or the emulator causing a bug.
 

Blasteh

Lord Farquaad
Apr 3, 2013
1,151
513
I would just create a new database and then test it that way. If it shows the amount of users online then you know that it was your old database or the emulator causing a bug.
That database you provided doesn't even import, a lot of errors.
 

Kods

New Member
Aug 17, 2015
22
5
If you're using RevCMS it's due to the emulator not updating your server_status table, inside app/class.core.php you will find final public function getOnline() from there change the query to not get the online status from your server_status table.
 

Blasteh

Lord Farquaad
Apr 3, 2013
1,151
513
If you're using RevCMS it's due to the emulator not updating your server_status table, inside app/class.core.php you will find final public function getOnline() from there change the query to not get the online status from your server_status table.
Where would I set it to get it from?

Code:
    final public function getOnline()
    {
        global $engine;
        return $engine->result("SELECT users_online FROM server_status");
    }
 

Kods

New Member
Aug 17, 2015
22
5
I'm pretty weak with MySQL and PHP so here's me having a shot at it.
Code:
    final public function getOnline()
    {
        global $engine;
        return $engine->result("SELECT online FROM users WHERE online='0'");
    }
If you keep getting problems private message me your Skype? I can reply faster there.
 

MadMonsterMan

Member
Mar 25, 2016
202
13
Drop the table "server_status"
And import this into your database after deleting the table "server_status":
Code:
CREATE TABLE `server_status` (
  `users_online` int(11) NOT NULL DEFAULT '0',
  `loaded_rooms` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Data dump for tabellen `server_status`
--

INSERT INTO `server_status` (`users_online`, `loaded_rooms`) VALUES
(0, 0);
This SQL came straight from the boon.sql this will fix your problem.
 

iGlenn

:)
Jul 21, 2015
618
92
Drop the table "server_status"
And import this into your database after deleting the table "server_status":
Code:
CREATE TABLE `server_status` (
  `users_online` int(11) NOT NULL DEFAULT '0',
  `loaded_rooms` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Data dump for tabellen `server_status`
--

INSERT INTO `server_status` (`users_online`, `loaded_rooms`) VALUES
(0, 0);
This SQL came straight from the boon.sql this will fix your problem.
worked, you're a lifesaver
 

Users who are viewing this thread

Top