News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

PHP Warning: Unable to read/write from/to socket

Started by demonxanx, September 06, 2015, 09:26:06 AM

Previous topic - Next topic

demonxanx

Hey! Just looking for help right now.
I'm trying to set up a server status page on my website that monitors my steam server i.e checking how many players are on the server, what's the current map etc.
So I'm using a massive php script which can be found here: hxxp:forum.keenswh.com/threads/web-server-status-php-script.6924299/ [nonactive]

Basically I upload the files. I set it up a bit and check it out and it ain't working. So from the error logs I come across this:

[06-Sep-2015 13:17:21 UTC] PHP Warning:  socket_read() [<a href='function.socket-read'>function.socket-read</a>]: unable to read from socket [104]: Connection reset by peer in /home/moonshad/public_html/servers/test/Socket.php on line 24
[06-Sep-2015 13:17:21 UTC] PHP Warning:  socket_send() [<a href='function.socket-send'>function.socket-send</a>]: unable to write to socket [1]: Operation not permitted in /home/moonshad/public_html/servers/test/Socket.php on line 193


This is what is on line 24:
$response = socket_read($socket,2048);

This is what is on line 193:
   $sendResult = socket_send($this->socket, $data, strlen($data), 0);

So now I'm just wondering, any idea how to get this to work? I went into file permissions and permitted read and write but it didn't seem to fix the problem so I'm just wondering if it's something to do with your hosting.

live627

You have sockets disabled; ask your host about it.

Advertisement: