• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

'Players Online' pedestal not working properly

arturhaddad

Member
Joined
Aug 14, 2010
Messages
217
Reaction score
8
The pedestal that tells how many players are online isn't working sometimes:

2vv4a53.png


Sometimes it works, telling the number of players online.


The script:
PHP:
            <img id="PedestalAndOnline" src="<?PHP echo $layout_name; ?>/images/header/pedestal-and-online.gif" alt="Monster Pedestal and Players Online Box"/>
		  <?PHP
		  if(count($config['site']['worlds']) > 1)
			  $whoisonlineworld = '?subtopic=whoisonline'; 
		  else
			  $whoisonlineworld = '?subtopic=whoisonline&world=0';
		  ?>
             <div id="PlayersOnline" onClick="window.location='<?PHP echo $whoisonlineworld; ?>'">

		  <?PHP
			if($config['status']['serverStatus_online'] == 1)
				echo $config['status']['serverStatus_players'].'<br />Players Online';
			else
				echo '<font color="red"><b>Server<br />OFFLINE</b></font>';
		  ?></div>
        </div>

Thanks++





////////////////
solution
by Cykotitan and Dankoo

chmod 777 /var/www/config/serverstatus
 
Last edited:
For the ['serverStatus_players'] you need to find that in your config file of gesior. If it doesnt exist you should make the code manually.

Regards,
Wodian
 
For the ['serverStatus_players'] you need to find that in your config file of gesior. If it doesnt exist you should make the code manually.

Regards,
Wodian

He said it works sometimes, it it does, then the code is right...

What could possibly make the script work some times, and some times don't? lol

maybe chmods?
 
if it works sometimes, it probably works every 5 mins (that's the default status timeout) which means it doesn't have the permissions to save the data. make sure /www/config/serverstatus has write permissions
 
give permissions in var/www/config/serverstatus click right and click propeties number 777 .. its works!!
its other option or in putty
 
Back
Top