PHP-Minecraft-Rcon icon indicating copy to clipboard operation
PHP-Minecraft-Rcon copied to clipboard

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4212720152 bytes)

Open Erroram2020 opened this issue 4 years ago • 8 comments

Topic ;v

Erroram2020 avatar Nov 12 '20 14:11 Erroram2020

We need to see your code or that error is useless.

SomKen avatar Nov 12 '20 15:11 SomKen

i just a copy paste a example and rename host and passowrd

$host = 'cavecloud.pl'; $port = 55; $password = 'mypassword'; $timeout = 3;

use Thedudeguy\Rcon;

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

if ($rcon->connect()) { $rcon->sendCommand("say Hello World!"); }

Erroram2020 avatar Nov 12 '20 16:11 Erroram2020

With your credentials removed, what does YOUR code look like?

SomKen avatar Nov 12 '20 16:11 SomKen

Edited

Erroram2020 avatar Nov 12 '20 16:11 Erroram2020

I just wanna test, and sendcommand after a page load

Erroram2020 avatar Nov 12 '20 16:11 Erroram2020

This error is on line 207 at Rcon.php.

line 207: $packet_data = fread($this->socket, $size);

Erroram2020 avatar Nov 12 '20 16:11 Erroram2020

This error is on line 207 at Rcon.php.

line 207: $packet_data = fread($this->socket, $size);

Screenshot? Also, did you install this via composer?

SomKen avatar Nov 14 '20 07:11 SomKen

Don't know if the problem is still actual, but as i remember i had the same message when i mixed up server port and rcon port.

Hexagon-Dev avatar Jan 08 '21 09:01 Hexagon-Dev