Austinb / GameQ

A PHP Gameserver Status Query Library
https://austinb.github.io/GameQ/
GNU Lesser General Public License v3.0
404 stars 136 forks source link

Error querying TS3 server #293

Closed Memphis017 closed 8 years ago

Memphis017 commented 8 years ago

On V3 If Teamspeak3 server is powered off "stream_socket_client" returns error 10061, this is not happening on V2.0.1

ts3query_error

Austinb commented 8 years ago

I need a sever to test against so I can see how the handling has changed. Please provide the ports and ip to connect. Also what version of php?

Memphis017 commented 8 years ago

212.83.134.164:9987 / 10011 tested on php 5.6.16. This is only happening when server is off.

Memphis017 commented 8 years ago

You can try this one too : 195.154.38.37:9987 / 10011, it is stopped and produce above error.

kraxarn commented 8 years ago

Had the same issue and fixed it by removing utf8_encode on line 234 in GameQ/Protocols/Teamspeak3.php

296

Austinb commented 8 years ago

@KraXarN I am not sure what you are referring to the issue is an active connection refused warning. Needs a bit of better error handing. utf8_encode only runs if there is actually any data being returned.

@Memphis017 I should have a fix shortly.

Memphis017 commented 8 years ago

Fatal error is gone, still have a bunch of warnings though, thx for the fix.

capture

Austinb commented 8 years ago

Are you running with debug mode enabled? What is the server information? That appears to be related to a bad connection with the server.

Memphis017 commented 8 years ago

nope, no debug mode (except php one of course), with debug on i get this :

capture

It is when querying the second server posted earlier, which is powered off. If there is no server answers (or no server at all !) script must exit silently and return minimum values like in V2, am I right ?

Austinb commented 8 years ago

Please pull latest @dev and let me know your result. Thanks for the help and hopefully this fixes your issue.

Memphis017 commented 8 years ago

No, thanks to you, this issue is resolved ! That's how you do a good library :+1: