server status

glemor123

New member
Messages
287
Points
0
about flux cp

what is my server status still offline eventhough i configured it correctly and my server is up

 
Don't use '127.0.0.1' on your server.php, instead, put your real IP address there.

 
Don't use '127.0.0.1' on your server.php, instead, put your real IP address there.
it is already set

>Maybe the website doesn't allow outgoing ports?

 
i think it does not allow.. how can i fake the offline text there and make it to online?
themes/status/status.php if i'm not mistaken..
what to edit here

Code:
<?phpif (!defined('FLUX_ROOT')) exit;$title = Flux::message('ServerStatusTitle');$cache = FLUX_DATA_DIR.'/tmp/ServerStatus.cache';if (file_exists($cache) && (time() - filemtime($cache)) < (Flux::config('ServerStatusCache') * 60)) {	$serverStatus = unserialize(file_get_contents($cache));}else {	$serverStatus = array();	foreach (Flux::$loginAthenaGroupRegistry as $groupName => $loginAthenaGroup) {		if (!array_key_exists($groupName, $serverStatus)) {			$serverStatus[$groupName] = array();		}		$loginServerUp = $loginAthenaGroup->loginServer->isUp();		foreach ($loginAthenaGroup->athenaServers as $athenaServer) {			$serverName = $athenaServer->serverName;			$sql = "SELECT COUNT(char_id) AS players_online FROM {$athenaServer->charMapDatabase}.char WHERE online > 0";			$sth = $loginAthenaGroup->connection->getStatement($sql);			$sth->execute();			$res = $sth->fetch();			$serverStatus[$groupName][$serverName] = array(				'loginServerUp' => $loginServerUp,				 'charServerUp' => $athenaServer->charServer->isUp(),				  'mapServerUp' => $athenaServer->mapServer->isUp(),				'playersOnline' => intval($res ? $res->players_online : 0)			);		}	}		$fp = fopen($cache, 'w');	if (is_resource($fp)) {		fwrite($fp, serialize($serverStatus));		fclose($fp);	}}?>
 
find this themes/server/status.php

<?php if (!defined('FLUX_ROOT')) exit; ?><h2><?php echo htmlspecialchars(Flux::message('ServerStatusHeading')) ?></h2><p><?php echo htmlspecialchars(Flux::message('ServerStatusInfo')) ?></p><?php foreach ($serverStatus as $privServerName => $gameServers): ?><h3>Server Status for <?php echo htmlspecialchars($privServerName) ?></h3><table id="server_status"> <tr> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusServerLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusLoginLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusCharLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusMapLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusOnlineLabel')) ?></td> </tr> <?php foreach ($gameServers as $serverName => $gameServer): ?> <tr> <th class="server"><?php echo htmlspecialchars($serverName) ?></th> <td class="status"><?php echo $this->serverUpDown($gameServer['loginServerUp']) ?></td> <td class="status"><?php echo $this->serverUpDown($gameServer['charServerUp']) ?></td> <td class="status"><?php echo $this->serverUpDown($gameServer['mapServerUp']) ?></td> <td class="status"><?php echo $gameServer['playersOnline'] ?></td> </tr> <?php endforeach ?></table><?php endforeach ?>

replace by..

Code:
<?php if (!defined('FLUX_ROOT')) exit; ?><h2><?php echo htmlspecialchars(Flux::message('ServerStatusHeading')) ?></h2><p><?php echo htmlspecialchars(Flux::message('ServerStatusInfo')) ?></p><?php foreach ($serverStatus as $privServerName => $gameServers): ?><h3>Server Status for <?php echo htmlspecialchars($privServerName) ?></h3><table id="server_status">	<tr>		<td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusServerLabel')) ?></td>		<td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusLoginLabel')) ?></td>		<td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusCharLabel')) ?></td>		<td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusMapLabel')) ?></td>		<td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusOnlineLabel')) ?></td>	</tr>	<?php foreach ($gameServers as $serverName => $gameServer): ?>	<tr>		<th class="server"><?php echo htmlspecialchars($serverName) ?></th>		<td class="status"><?php echo $this->ONLINE ?></td>		<td class="status"><?php echo $this->ONLINE ?></td>		<td class="status"><?php echo $this->ONLINE ?></td>		<td class="status"><?php echo $gameServer['playersOnline'] ?></td>	</tr>	<?php endforeach ?></table><?php endforeach ?>
 
find this themes/server/status.php

<?php if (!defined('FLUX_ROOT')) exit; ?><h2><?php echo htmlspecialchars(Flux::message('ServerStatusHeading')) ?></h2><p><?php echo htmlspecialchars(Flux::message('ServerStatusInfo')) ?></p><?php foreach ($serverStatus as $privServerName => $gameServers): ?><h3>Server Status for <?php echo htmlspecialchars($privServerName) ?></h3><table id="server_status"> <tr> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusServerLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusLoginLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusCharLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusMapLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusOnlineLabel')) ?></td> </tr> <?php foreach ($gameServers as $serverName => $gameServer): ?> <tr> <th class="server"><?php echo htmlspecialchars($serverName) ?></th> <td class="status"><?php echo $this->serverUpDown($gameServer['loginServerUp']) ?></td> <td class="status"><?php echo $this->serverUpDown($gameServer['charServerUp']) ?></td> <td class="status"><?php echo $this->serverUpDown($gameServer['mapServerUp']) ?></td> <td class="status"><?php echo $gameServer['playersOnline'] ?></td> </tr> <?php endforeach ?></table><?php endforeach ?>

replace by..

<?php if (!defined('FLUX_ROOT')) exit; ?><h2><?php echo htmlspecialchars(Flux::message('ServerStatusHeading')) ?></h2><p><?php echo htmlspecialchars(Flux::message('ServerStatusInfo')) ?></p><?php foreach ($serverStatus as $privServerName => $gameServers): ?><h3>Server Status for <?php echo htmlspecialchars($privServerName) ?></h3><table id="server_status"> <tr> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusServerLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusLoginLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusCharLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusMapLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusOnlineLabel')) ?></td> </tr> <?php foreach ($gameServers as $serverName => $gameServer): ?> <tr> <th class="server"><?php echo htmlspecialchars($serverName) ?></th> <td class="status"><?php echo $this->ONLINE ?></td> <td class="status"><?php echo $this->ONLINE ?></td> <td class="status"><?php echo $this->ONLINE ?></td> <td class="status"><?php echo $gameServer['playersOnline'] ?></td> </tr> <?php endforeach ?></table><?php endforeach ?>
doesnt work..your status is different to my status

 
find this themes/server/status.php

<?php if (!defined('FLUX_ROOT')) exit; ?><h2><?php echo htmlspecialchars(Flux::message('ServerStatusHeading')) ?></h2><p><?php echo htmlspecialchars(Flux::message('ServerStatusInfo')) ?></p><?php foreach ($serverStatus as $privServerName => $gameServers): ?><h3>Server Status for <?php echo htmlspecialchars($privServerName) ?></h3><table id="server_status"> <tr> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusServerLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusLoginLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusCharLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusMapLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusOnlineLabel')) ?></td> </tr> <?php foreach ($gameServers as $serverName => $gameServer): ?> <tr> <th class="server"><?php echo htmlspecialchars($serverName) ?></th> <td class="status"><?php echo $this->serverUpDown($gameServer['loginServerUp']) ?></td> <td class="status"><?php echo $this->serverUpDown($gameServer['charServerUp']) ?></td> <td class="status"><?php echo $this->serverUpDown($gameServer['mapServerUp']) ?></td> <td class="status"><?php echo $gameServer['playersOnline'] ?></td> </tr> <?php endforeach ?></table><?php endforeach ?>

replace by..

<?php if (!defined('FLUX_ROOT')) exit; ?><h2><?php echo htmlspecialchars(Flux::message('ServerStatusHeading')) ?></h2><p><?php echo htmlspecialchars(Flux::message('ServerStatusInfo')) ?></p><?php foreach ($serverStatus as $privServerName => $gameServers): ?><h3>Server Status for <?php echo htmlspecialchars($privServerName) ?></h3><table id="server_status"> <tr> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusServerLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusLoginLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusCharLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusMapLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusOnlineLabel')) ?></td> </tr> <?php foreach ($gameServers as $serverName => $gameServer): ?> <tr> <th class="server"><?php echo htmlspecialchars($serverName) ?></th> <td class="status"><?php echo $this->ONLINE ?></td> <td class="status"><?php echo $this->ONLINE ?></td> <td class="status"><?php echo $this->ONLINE ?></td> <td class="status"><?php echo $gameServer['playersOnline'] ?></td> </tr> <?php endforeach ?></table><?php endforeach ?>
doesnt work..your status is different to my status
You should have told me that you're not using a default theme.

 
find this themes/server/status.php

<?php if (!defined('FLUX_ROOT')) exit; ?><h2><?php echo htmlspecialchars(Flux::message('ServerStatusHeading')) ?></h2><p><?php echo htmlspecialchars(Flux::message('ServerStatusInfo')) ?></p><?php foreach ($serverStatus as $privServerName => $gameServers): ?><h3>Server Status for <?php echo htmlspecialchars($privServerName) ?></h3><table id="server_status"> <tr> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusServerLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusLoginLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusCharLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusMapLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusOnlineLabel')) ?></td> </tr> <?php foreach ($gameServers as $serverName => $gameServer): ?> <tr> <th class="server"><?php echo htmlspecialchars($serverName) ?></th> <td class="status"><?php echo $this->serverUpDown($gameServer['loginServerUp']) ?></td> <td class="status"><?php echo $this->serverUpDown($gameServer['charServerUp']) ?></td> <td class="status"><?php echo $this->serverUpDown($gameServer['mapServerUp']) ?></td> <td class="status"><?php echo $gameServer['playersOnline'] ?></td> </tr> <?php endforeach ?></table><?php endforeach ?>

replace by..

<?php if (!defined('FLUX_ROOT')) exit; ?><h2><?php echo htmlspecialchars(Flux::message('ServerStatusHeading')) ?></h2><p><?php echo htmlspecialchars(Flux::message('ServerStatusInfo')) ?></p><?php foreach ($serverStatus as $privServerName => $gameServers): ?><h3>Server Status for <?php echo htmlspecialchars($privServerName) ?></h3><table id="server_status"> <tr> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusServerLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusLoginLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusCharLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusMapLabel')) ?></td> <td class="status"><?php echo htmlspecialchars(Flux::message('ServerStatusOnlineLabel')) ?></td> </tr> <?php foreach ($gameServers as $serverName => $gameServer): ?> <tr> <th class="server"><?php echo htmlspecialchars($serverName) ?></th> <td class="status"><?php echo $this->ONLINE ?></td> <td class="status"><?php echo $this->ONLINE ?></td> <td class="status"><?php echo $this->ONLINE ?></td> <td class="status"><?php echo $gameServer['playersOnline'] ?></td> </tr> <?php endforeach ?></table><?php endforeach ?>
doesnt work..your status is different to my status
You should have told me that you're not using a default theme.
sorry about that..the status i posted above is my status

 
Tell me the link for your website. I want to see the website. Also, if possible are you using a default theme or a custom one?

 
yes. the status.php is the same with default. It's the same with what I posted earlier.
nope sir is does not change the offline thing

this is my status from that default flux 

Code:
<?phpif (!defined('FLUX_ROOT')) exit; $title = Flux::message('ServerStatusTitle');$cache = FLUX_DATA_DIR.'/tmp/ServerStatus.cache'; if (file_exists($cache) && (time() - filemtime($cache)) < (Flux::config('ServerStatusCache') * 60)) {	$serverStatus = unserialize(file_get_contents($cache));}else {	$serverStatus = array();	foreach (Flux::$loginAthenaGroupRegistry as $groupName => $loginAthenaGroup) {		if (!array_key_exists($groupName, $serverStatus)) {			$serverStatus[$groupName] = array();		} 		$loginServerUp = $loginAthenaGroup->loginServer->isUp(); 		foreach ($loginAthenaGroup->athenaServers as $athenaServer) {			$serverName = $athenaServer->serverName; 			$sql = "SELECT COUNT(char_id) AS players_online FROM {$athenaServer->charMapDatabase}.char WHERE online > 0";			$sth = $loginAthenaGroup->connection->getStatement($sql);			$sth->execute();			$res = $sth->fetch(); 			$serverStatus[$groupName][$serverName] = array(				'loginServerUp' => $loginServerUp,				 'charServerUp' => $athenaServer->charServer->isUp(),				  'mapServerUp' => $athenaServer->mapServer->isUp(),				'playersOnline' => intval($res ? $res->players_online : 0)			);		}	}		$fp = fopen($cache, 'w');	if (is_resource($fp)) {		fwrite($fp, serialize($serverStatus));		fclose($fp);	}}?>
 
yes. the status.php is the same with default. It's the same with what I posted earlier.
nope sir is does not change the offline thing

this is my status from that default flux 

<?phpif (!defined('FLUX_ROOT')) exit; $title = Flux::message('ServerStatusTitle');$cache = FLUX_DATA_DIR.'/tmp/ServerStatus.cache'; if (file_exists($cache) && (time() - filemtime($cache)) < (Flux::config('ServerStatusCache') * 60)) { $serverStatus = unserialize(file_get_contents($cache));}else { $serverStatus = array(); foreach (Flux::$loginAthenaGroupRegistry as $groupName => $loginAthenaGroup) { if (!array_key_exists($groupName, $serverStatus)) { $serverStatus[$groupName] = array(); } $loginServerUp = $loginAthenaGroup->loginServer->isUp(); foreach ($loginAthenaGroup->athenaServers as $athenaServer) { $serverName = $athenaServer->serverName; $sql = "SELECT COUNT(char_id) AS players_online FROM {$athenaServer->charMapDatabase}.char WHERE online > 0"; $sth = $loginAthenaGroup->connection->getStatement($sql); $sth->execute(); $res = $sth->fetch(); $serverStatus[$groupName][$serverName] = array( 'loginServerUp' => $loginServerUp, 'charServerUp' => $athenaServer->charServer->isUp(), 'mapServerUp' => $athenaServer->mapServer->isUp(), 'playersOnline' => intval($res ? $res->players_online : 0) ); } } $fp = fopen($cache, 'w'); if (is_resource($fp)) { fwrite($fp, serialize($serverStatus)); fclose($fp); }}?>
this is not the theme status.php rather the module/server/status.php..  I already told you that the file was located themes/server/status.php

 
yes. the status.php is the same with default. It's the same with what I posted earlier.
nope sir is does not change the offline thing

this is my status from that default flux 

<?phpif (!defined('FLUX_ROOT')) exit; $title = Flux::message('ServerStatusTitle');$cache = FLUX_DATA_DIR.'/tmp/ServerStatus.cache'; if (file_exists($cache) && (time() - filemtime($cache)) < (Flux::config('ServerStatusCache') * 60)) { $serverStatus = unserialize(file_get_contents($cache));}else { $serverStatus = array(); foreach (Flux::$loginAthenaGroupRegistry as $groupName => $loginAthenaGroup) { if (!array_key_exists($groupName, $serverStatus)) { $serverStatus[$groupName] = array(); } $loginServerUp = $loginAthenaGroup->loginServer->isUp(); foreach ($loginAthenaGroup->athenaServers as $athenaServer) { $serverName = $athenaServer->serverName; $sql = "SELECT COUNT(char_id) AS players_online FROM {$athenaServer->charMapDatabase}.char WHERE online > 0"; $sth = $loginAthenaGroup->connection->getStatement($sql); $sth->execute(); $res = $sth->fetch(); $serverStatus[$groupName][$serverName] = array( 'loginServerUp' => $loginServerUp, 'charServerUp' => $athenaServer->charServer->isUp(), 'mapServerUp' => $athenaServer->mapServer->isUp(), 'playersOnline' => intval($res ? $res->players_online : 0) ); } } $fp = fopen($cache, 'w'); if (is_resource($fp)) { fwrite($fp, serialize($serverStatus)); fclose($fp); }}?>
this is not the theme status.php rather the module/server/status.php..  I already told you that the file was located themes/server/status.php
sorry about that i already change my status.. but there are no ONLINE text there

look

http://3rdjob.reviserogaming.org/?module=server&action=status

 
Last edited by a moderator:
Back
Top