• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

website flyff

Status
Not open for further replies.
Newbie Spellweaver
Joined
Mar 23, 2020
Messages
85
Reaction score
3
My website and my server are online and the website says that my channel 1-1 server is offline



xinc_functions.php
Code:
function getUserOnlineState($channel, $id = 0) {
        global $_CONFIG;
if($id == 0) {
            if ($channel > 0) {
                return '<img src="https://forum.ragezone.com/images/icons/misc/up.png" width="7" alt="" data-toggle="tooltip" data-placement="bottom" title="Online: ' . $_CONFIG['allg_svr_channel'][$channel][0] . ' [1-' . $channel . ']"/>';
            }
              else {
                return '<img src="https://forum.ragezone.com/images/icons/misc/down.png" width="7" alt="" data-toggle="tooltip" data-placement="bottom" title="Offline"/>';
            }
        }
        elseif($id == 1) {
            if ($channel > 0) {
                return '<span class="green">Online</span>';
            }
            else {
                return '<span class="red">Offline</span>';
            }
        }
    }
and
Code:
function checkServerState($port, $ip = '127.0.0.1') {
        if(@fsockopen($ip, $port, $errno, $errstr, 0.15) >= 0.15) {return '<span class="green">Online</span>';}
         else {return '<span class="red">Offline</span>';}
    }
    function zeilenumbruch($totalElements, $elementsPerRow) {
        if($totalElements / $elementsPerRow == round($totalElements / $elementsPerRow)) {
            echo '<br />';
        }
    }
xinc_config
Code:
$_CONFIG['allg_svr_channel'] = array(
		1 => array(
			'Channel 1-1',			5400
		),
	);

and AccountServer.ini
Code:
AddTail( -1, 1, "Flyff", "192.168.15.108", 0, 1, 1000 );
AddTail( 1, 1, "Canal 1", "192.168.15.108", 1, 1, 1000 );
 
Last edited:
Inactive
Joined
Jan 20, 2009
Messages
1,014
Reaction score
1,830
You can do it the lazy way to fix it simply by changing:

Code:
'Channel 1-1',			5400

To
Code:
'Channel 1-1',			80

Granted you have a webserver.
 
Newbie Spellweaver
Joined
Mar 23, 2020
Messages
85
Reaction score
3
thank you very much, you are the best, i saw this door until i tried to release it but i didn't think to change it.
 
Inactive
Joined
Jan 20, 2009
Messages
1,014
Reaction score
1,830
Also want to point out if this is a sapphire based site it will have a few exploits that you really should fix lol.

Make sure you apply this fix: xBlubbs Website Exploit Fix - RaGEZONE - MMO development community

Also in box_loginbox.php:

Change:
Code:
	else {
		$_SERVER['REQUEST_URI'] = str_replace(array('\\', '&logout','?logout'), '', $_SERVER['REQUEST_URI']);
		echo '
<form method="post" name="login" action="' . $_SERVER['REQUEST_URI'] . '">

To:
Code:
	else {
		$_SERVER['REQUEST_URI'] = str_replace(array('\\', '&logout','?logout'), '', htmlspecialchars($_SERVER['REQUEST_URI']));
		echo '
<form method="post" name="login" action="' . htmlspecialchars($_SERVER['REQUEST_URI']) . '">
 
Newbie Spellweaver
Joined
Mar 23, 2020
Messages
85
Reaction score
3
sorry for the delay, just a doubt, when i changed the port to 80 of the xinc_config file, now mine if my server is offline, it keeps showing up online on the site.

Thank you very much for the tips on the site, I'll fix
 
Inactive
Joined
Jan 20, 2009
Messages
1,014
Reaction score
1,830
sorry for the delay, just a doubt, when i changed the port to 80 of the xinc_config file, now mine if my server is offline, it keeps showing up online on the site.

Thank you very much for the tips on the site, I'll fix

Change it to match the cache port in your source or 23000 or 28000.
 
Status
Not open for further replies.
Back
Top