• 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!

Solved Server OFFLINE (Even when server online.)

Rossii

Member
Joined
Mar 27, 2012
Messages
366
Reaction score
6
Location
England
Yoo dno what script you need but please help me fix my bug on my website always says server offline


qyh0g0.png


repp++
 
Last edited:
You problem is in config-and-functions.php
PHP:
$sock = @fsockopen("localhost", $config['server']['statusPort'], $errno, $errstr, 1);
changed for
PHP:
$sock = @fsockopen("127.0.0.1", $config['server']['statusPort'], $errno, $errstr, 1);

or post your config-and-functions ,but first try..
 
You problem is in config-and-functions.php
PHP:
$sock = @fsockopen("localhost", $config['server']['statusPort'], $errno, $errstr, 1);
changed for
PHP:
$sock = @fsockopen("127.0.0.1", $config['server']['statusPort'], $errno, $errstr, 1);

or post your config-and-functions ,but first try..

It wasent that either my friend helped me

- - - Updated - - -

SOLVED
 
Code:
$host = 'ChangetoyourIp';
$port = 7171;
$connection = @fsockopen($host, $port);

    if (is_resource($connection))
    {
        echo 'SERVER ONLINE';

        fclose($connection);
    }

    else
    {
        echo 'SERVER OFFLINE';
    }
}

If you know a little PHP you can just write your own script ^
It works for me, when everything else doesnt.
 
Code:
$host = 'ChangetoyourIp';
$port = 7171;
$connection = @fsockopen($host, $port);

    if (is_resource($connection))
    {
        echo 'SERVER ONLINE';

        fclose($connection);
    }

    else
    {
        echo 'SERVER OFFLINE';
    }
}

If you know a little PHP you can just write your own script ^
It works for me, when everything else doesnt.
:) Where should I put this? (Yes I'm pretty newbie to this).
 
U need basic PHP knowledge, but : use sadmans search (google it)
and find inside files: fsockopen
You will see the line number and the file.

then you know where to put code, but u need to remove some part too - remember to make a copy of the file you are using (backup)
u can change the IP to 127.0.0.1, localhost, global ip, whatever works-_

fsockopen is the command... google it, and learn PHP
kk thx Bai.
 
U need basic PHP knowledge, but : use sadmans search (google it)
and find inside files: fsockopen
You will see the line number and the file.

then you know where to put code, but u need to remove some part too - remember to make a copy of the file you are using (backup)
u can change the IP to 127.0.0.1, localhost, global ip, whatever works-_

fsockopen is the command... google it, and learn PHP
kk thx Bai.

Hmm, Didnt find anything.. (Ooh... and Im using Uniform Server, that might be the problem?) And thanks for the program, will be handy :)
 
Back
Top