thedudeguy / PHP-Minecraft-Rcon

Simple Rcon class for php.
MIT License
155 stars 54 forks source link

rcon php is not work #27

Open CmoIKOnE opened 3 years ago

CmoIKOnE commented 3 years ago

require_once "rcon.php";

$host = $host_ST;
$port = $port_ST;
$password = $password_ST;
$timeout = $timeout_ST;

use Thedudeguy\Rcon;

$rcon = new Rcon($host, $port, $password, $timeout); error_reporting(E_ALL);

if($rcon->connect()) echo "+";
    else echo "-";

Help, please, tried the old solution to this error.

SomKen commented 3 years ago

Could you readd your comment with the "code" github comment? Its the < > button.

Also, what does the code really look like with your ip / rcon port? Whats your minecraft launch paramenters?

CmoIKOnE commented 3 years ago

Не могли бы вы прочитать свой комментарий с комментарием github "code"? Это кнопка <>.

Кроме того, как на самом деле выглядит код с вашим портом ip / rcon? Какие у вас параметры запуска Minecraft?

paramenter - java -Dlauncher.noJAnsi=true -Xms6G -Xmx8G -Xincgc -cp ServerWrapper.jar:server.jar pro.gravit.launcher.server.ServerWrapper

I entered all data as with server.properties

CmoIKOnE commented 3 years ago

image

ricardoboss commented 3 years ago

Is there any error message? Does it just time out? What is not working?

CmoIKOnE commented 3 years ago

message is not visible at all, it's just that the rkon can't work ... But before that it worked, when the rkon was inserted, everything worked clearly, and then when it was for technical work. After him and rkon broke

SomKen commented 3 years ago

Linux or windows?

Run netstat -peanut | grep "LISTEN" on linux as root and make sure Java is listening on port 25566

ricardoboss commented 3 years ago

If there is no message visible at all (your code would output either '+' or '-'), there might be something wrong with your PHP server. Please verify

CmoIKOnE commented 3 years ago

Если сообщение вообще не отображается (ваш код выводит либо «+», либо «-»), возможно, что-то не так с вашим PHP-сервером. Пожалуйста, подтвердите

if about this, then displayed -

CmoIKOnE commented 3 years ago

Linux или windows?

Запустите netstat -peanut | grep "LISTEN"Linux как root и убедитесь, что Java прослушивает порт 25566

написал, все таки не работает.

CmoIKOnE commented 3 years ago

I'm writing error_reporting (E_ALL & ~ E_NOTICE & ~ E_DEPRECATED & ~ E_STRICT); and no nichrome, everything is in order, probably.

SomKen commented 3 years ago

написал, все таки не работает.

You need to provide the output... That command doesn't fix anything.