Realmstatus doesn't work

Requests, feedback, and general discussion about WoWRoster
DO NOT post topics about WoWRoster AddOns here!

Realmstatus doesn't work

Postby zanix » Wed Aug 23, 2006 5:40 am

We have changed to using preg_match for realmstatus in roster 1.7.1
So all this substr, stristr, strpos changes wont be needed
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Realmstatus doesn't work

Postby Logan » Fri Aug 25, 2006 1:50 am

shaun.voysey wrote:After an Exhaustive search through the html parser. I have... <smuggly>
...fixed the problem with the Realmstatus.

Find, in your wowroster Directory, the file 'realmstatus.php'

open the file in a text editor and ...

find

Code: Select all
   // Figure out Server Pop.
      foreach($pops as $p)
      {
      $serverpop = stristr(substr($html, ($pos + 290), 35), $p);



replace with

Code: Select all
   // Figure out Server Pop.
      foreach($pops as $p)
      {
      $serverpop = stristr(substr($html, ($pos + 288), 35), $p);


The problem comes down to the new pages on the European website. :thumleft:

The substring was 2 characters too far, so the Population Variable was not set, so the database was not updated.

Simple really.


Just to confirm, this 'fix' sorted the problem for me.

Its now reporting the realm status correctly for European PvP Server Deathwing.

Cheers Shaun ;)
User avatar
Logan
WR.net Apprentice
WR.net Apprentice
 
Posts: 12
Joined: Mon Aug 21, 2006 9:10 pm
Location: Northampton, UK

Realmstatus doesn't work

Postby GuaRRand » Fri Aug 25, 2006 2:32 am

Not Working for Argent Dawn either....
User avatar
GuaRRand
WR.net Apprentice
WR.net Apprentice
 
Posts: 32
Joined: Wed Aug 23, 2006 9:59 pm
Location: NL

Re: Realmstatus doesn't work

Postby FireBladeXL » Fri Aug 25, 2006 2:58 am

I tried this too, but i still get the "No status" image.

anyone know what to adjust to log EU server "Thunderhorn" ??
User avatar
FireBladeXL
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Thu Aug 24, 2006 4:08 pm

Realmstatus doesn't work

Postby shaun.voysey » Sat Aug 26, 2006 4:44 pm

Did spot another error in the Realmstatus code while the servers were down for the extended Maintenance.

Again in the Html parser, you configure the Population variable to 'Offline' when the server is down, Then continue to reset the Variable outside of the If Statement. A bit silly really. :)

Replace the Html parser code with this :-

Code: Select all
//==========[ HTML PARSER ]============================================================

   if (isset($html) && $html)
   {
      $pos = strpos($html, str_replace('\\', '',str_replace("'", ''', $server)));

      if (!$pos)
      {
         $error = $error.', check Realm name';
         $err = 1;
      }
      
   // Figure out Serverstatus
      $serverstatus = stristr(substr($html, ($pos - 165), 15), 'up');
      if (!$serverstatus)
      {
         $serverstatus = 'Down';
         $serverpop = 'Offline';
      }
      else
      {
         $serverstatus = 'Up';

   // Figure out Server Pop.
         foreach($pops as $p)
         {
            $serverpop = stristr(substr($html, ($pos + 288), 35), $p);
            if($serverpop)
            {
               $foundpop = 1;
               $serverpop = $p;
               break;
            }
         }
         if(!$foundpop)
         {
            $err = 1;
         }
      }

   // Figure out Servertype
      foreach($types as $t)
      {
      $servertype = stristr(substr($html, ($pos + 130), 30), $t);
         if($servertype)
         {
            $foundtype = 1;
            $servertype = $t;
            break;
         }
      }
      if(!$foundtype)
      {
         $err = 1;
      }
   }
   elseif ($xml)
   {
User avatar
shaun.voysey
WR.net Apprentice
WR.net Apprentice
 
Posts: 70
Joined: Thu Aug 10, 2006 12:50 pm
Location: Berkshire, England

Realmstatus doesn't work

Postby Elrosone » Sun Aug 27, 2006 9:29 pm

The same error.
Agamaggan (EU)
Elrosone
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Sun Aug 27, 2006 2:57 pm

Re: Realmstatus doesn't work

Postby shaun.voysey » Mon Aug 28, 2006 12:59 am

FireBladeXL wrote:I tried this too, but i still get the "No status" image.

anyone know what to adjust to log EU server "Thunderhorn" ??


I have checked the Realmstatus.php code with the mentioned Servers. as long as I run the Realmstatus.php direct, I get the Picture. If I run with the index page. I Don't.. :scratch:

Not sure where the Problem lies. Possibly the Header areas.
Last edited by shaun.voysey on Mon Aug 28, 2006 1:35 am, edited 1 time in total.
User avatar
shaun.voysey
WR.net Apprentice
WR.net Apprentice
 
Posts: 70
Joined: Thu Aug 10, 2006 12:50 pm
Location: Berkshire, England

Re: Realmstatus doesn't work

Postby Elrosone » Mon Aug 28, 2006 8:52 pm

I can't open realmstatus.php from my browser. This's the message i get:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/chs/myserver.com/home/html/roster/realmstatus.php on line 132

---
line num 132:
$error = $error.', check Realm name';
---

Any idea?
Thanks in advance.
Last edited by Elrosone on Mon Aug 28, 2006 8:54 pm, edited 1 time in total.
Elrosone
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Sun Aug 27, 2006 2:57 pm

Realmstatus doesn't work

Postby zanix » Tue Aug 29, 2006 11:36 am

Try re-uploading the file to your server
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Realmstatus doesn't work

Postby GuaRRand » Tue Sep 05, 2006 4:57 pm

Still no go for Argent Dawn, EU server (English)
User avatar
GuaRRand
WR.net Apprentice
WR.net Apprentice
 
Posts: 32
Joined: Wed Aug 23, 2006 9:59 pm
Location: NL

Re: Realmstatus doesn't work

Postby sturmy » Thu Sep 14, 2006 5:52 pm

I feel like upping an old thread, but somehow my realmstatus is not working as planned...

I've used the code changes from shaun.voysey above (BTW beware of the str_replace("'", ''' the second parameter is NOT triple quote, it is quote HTML code for quote and closing quote), the page updates once. And then stops updating?

I'm in image mode, and am using the english european page to check for my realm that contains no space or quote in it.

Looking at the realmstatus table in the DB hints that the timestamp stays the same. I emptied the table, it's not populating again (no source). I modify it manually to kick-start it, no go either (I mean the image is back, but still no updates).

Anyone with a hint for me? (if a new thread is needed for this post feel free to tell me, but I felt this was related big time)

How about getting the 1.7.1 code for realmstatus.php here?
sturmy
WR.net Expert
WR.net Expert
 
Posts: 160
Joined: Wed Aug 16, 2006 9:07 pm

Realmstatus doesn't work

Postby freegen » Fri Sep 15, 2006 12:57 am

Before people start narkin' at me (not that they will of course :D) I'd like to point out that I'm not a "born coder" and certainly don't do this for a living.

*grins*

I've updated the code as Shaun suggested, and I now have the server name, type and status (of sorts) showing. The code was modified from:

if (isset($html) && $html)
{
$pos = strpos($html, str_replace('\\', '',str_replace("'", ''', $server)));

if (!$pos)
{
$error = $error.', check Realm name';
$err = 1;
}

to...
$pos = strpos($html, str_replace('\\', '',str_replace("'", '\'', $server)));

if (!$pos)
{
$error = $error . ', check Realm name';
$err = 1;
}


Is this the reason that the status is showing as offline when in fact it's online?
freegen
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Thu Sep 14, 2006 2:52 am

Re: Realmstatus doesn't work

Postby sturmy » Fri Sep 15, 2006 9:08 pm

OK. Solved my problem. Found out that my realm name HAPPENED to be part of ANOTHER realm name which came first in the list when using EN or DE locales for the html realm page. Funny, huh? Result: no update happening.

So I added the European (french) realm page to the DB as a selection option, localized the population messages (and images) and realm types. It now updates seamlessly. Waiting for the next realm maintenance to check that the down status works.

Only thing left for me: use UTF-8 for "high" population translation: 'Élevée'
I have no clue as to what the capital accentuated letter is in UTF-8.
Last edited by sturmy on Fri Sep 15, 2006 9:19 pm, edited 1 time in total.
sturmy
WR.net Expert
WR.net Expert
 
Posts: 160
Joined: Wed Aug 16, 2006 9:07 pm

Re: Realmstatus doesn't work

Postby ahnernoch » Sun Sep 24, 2006 7:15 am

I tried everything what is written down here without help! is anybody able to fix the realmstatus.php that i get the Status for the German European Server EREDAR??
ahnernoch
WR.net Apprentice
WR.net Apprentice
 
Posts: 31
Joined: Sat Sep 02, 2006 12:33 am

Re: Realmstatus doesn't work

Postby Btcc22 » Mon Sep 25, 2006 8:49 am

I've applied all the suggested fixes, but I still can't get the EU English server, Zenedar to work.

Anybody have any ideas?

Thanks.
Last edited by Btcc22 on Mon Sep 25, 2006 8:50 am, edited 1 time in total.
Btcc22
WR.net Apprentice
WR.net Apprentice
 
Posts: 4
Joined: Mon Sep 25, 2006 8:32 am

PreviousNext

Return to General Support & Feedback

Who is online

Users browsing this forum: No registered users and 1 guest

cron