Write a message when the server is off

Discuss the Dedicated Server Tools developed by Nadeo Live such as ManiaLive, Trust Circles, Dedicated Manager, Competition Manager and Lobbies

Moderator: NADEO

Post Reply
User avatar
Lugurbal
Posts: 8
Joined: 17 Jun 2017, 00:27

Write a message when the server is off

Post by Lugurbal » 15 Jul 2017, 21:27

Hello,

I would write a message on my website when my server is off but at every time, i get a error :

Code: Select all

Fatal error: Uncaught Maniaplanet\DedicatedServer\Xmlrpc\TransportException: Cannot open socket in /home/lyreclan/www/vendor/maniaplanet/dedicated-server-api/libraries/Maniaplanet/DedicatedServer/Xmlrpc/GbxRemote.php:80 Stack trace: #0 /home/lyreclan/www/vendor/maniaplanet/dedicated-server-api/libraries/Maniaplanet/DedicatedServer/Xmlrpc/GbxRemote.php(34): Maniaplanet\DedicatedServer\Xmlrpc\GbxRemote->connect('127.0.0.1', '5001', '5') #1 /home/lyreclan/www/vendor/maniaplanet/dedicated-server-api/libraries/Maniaplanet/DedicatedServer/Connection.php(103): Maniaplanet\DedicatedServer\Xmlrpc\GbxRemote->__construct('127.0.0.1', '5001', '5') #2 /home/lyreclan/www/vendor/maniaplanet/dedicated-server-api/libraries/Maniaplanet/DedicatedServer/Connection.php(51): Maniaplanet\DedicatedServer\Connection->__construct('127.0.0.1', '5001', '5') #3 /home/lyreclan/www/admin/adminservtm.php(15): Maniaplanet\DedicatedServer\Connection::factory('127.0.0.1', '5001', '5', 'SuperAdmin', 'TestServ', '2013-04-16') #4 {main} thrown in /home/lyreclan/www/vendor/maniaplanet/dedicated-server-api/libraries/Maniaplanet/DedicatedServer/Xmlrpc/GbxRemote.php on line 80
Can you help me ?

User avatar
steeffeen
Translator
Translator
Posts: 2472
Joined: 14 Oct 2012, 16:22
Location: Germany

Re: Write a message when the server is off

Post by steeffeen » 16 Jul 2017, 07:31

well doesn't this error pretty much indicate that the server isn't running? so you could display the message on your website if this exception occurs
(I'm not sure if this is actually the case)

Code: Select all

try {
    $connection = Connection::factory();
} catch (TransportException $transportException) {
    echo "Server is offline";
}
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks

    Post Reply

    Return to “Dedicated Server Tools”

    Who is online

    Users browsing this forum: No registered users and 2 guests