Raised This Month: $51 Target: $400
 12% 

xPaw Source Query Class - Rcon problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 01-16-2015 , 09:37   xPaw Source Query Class - Rcon problem
Reply With Quote #1

I'm having problems with this, so i thought i'll ask here for help.
Problem is that i always get this error: "Can't connect to RCON server: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond."

I used code from this example:
https://github.com/xPaw/PHP-Source-Q...conExample.php
Everything i'm doing is on localhost with xampp server.

ps. I tried to send rcon password to public servers which are using Source response type, and i also tried to send rcon to servers which are using GoldSource. I still get the same error.

Any idea?
OvidiuS is offline
Send a message via Skype™ to OvidiuS
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 01-16-2015 , 20:37   Re: xPaw Source Query Class - Rcon problem
Reply With Quote #2

This class requires PHP Sockets enabled in webserver, search about this

Sorry for this reply, but i think it is your problem with the class.
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 01-16-2015 , 22:52   Re: xPaw Source Query Class - Rcon problem
Reply With Quote #3

Quote:
Originally Posted by ^SmileY View Post
This class requires PHP Sockets enabled in webserver, search about this

Sorry for this reply, but i think it is your problem with the class.
Quote:
Originally Posted by OvidiuS View Post
Everything i'm doing is on localhost with xampp server.
Are you sure that xampp by default has disabled php sockets?

Last edited by OvidiuS; 01-16-2015 at 22:53.
OvidiuS is offline
Send a message via Skype™ to OvidiuS
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 01-16-2015 , 23:03   Re: xPaw Source Query Class - Rcon problem
Reply With Quote #4

Check your php.ini, but I don't think they are disabled.
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 04-08-2015 , 13:54   Re: xPaw Source Query Class - Rcon problem
Reply With Quote #5

Okay, i'm gonna bump this, because i haven't found a solution for this problem.

ps. I have checked php sockets, and they are enabled in php.ini
OvidiuS is offline
Send a message via Skype™ to OvidiuS
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 04-08-2015 , 14:39   Re: xPaw Source Query Class - Rcon problem
Reply With Quote #6

So post how you is using source-query
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 04-09-2015 , 06:46   Re: xPaw Source Query Class - Rcon problem
Reply With Quote #7

PHP Code:
<?php
    
require __DIR__ '/SourceQuery/SourceQuery.class.php';
    
    
// For the sake of this example
    
Header'Content-Type: text/plain' );
    
Header'X-Content-Type-Options: nosniff' );
    
    
// Edit this ->
    
define'SQ_SERVER_ADDR''localhost' );
    
define'SQ_SERVER_PORT'27015 );
    
define'SQ_TIMEOUT',     );
    
define'SQ_ENGINE',      SourceQuery :: SOURCE );
    
// Edit this <-

    
$Query = new SourceQuery( );
    
    try
    {
        
$Query->ConnectSQ_SERVER_ADDRSQ_SERVER_PORTSQ_TIMEOUTSQ_ENGINE );

        
$Query->SetRconPassword'*******' );
        
$Query->Rcon'amxx version' );
    }
    catch( 
Exception $e )
    {
        
$Exception $e;
    }

    
    if( isset( 
$Exception ) )
    {
        echo 
"\nERROR!!!"; echo "\n";
        echo 
$e->getMessage( );
    }

    
$Query->Disconnect( );
?>
ps. Haven't checked the main post. I've got a new error now:
Can't connect to RCON server (10061) : No connection could be made because the target machine actively refused it.

Last edited by OvidiuS; 04-09-2015 at 06:56.
OvidiuS is offline
Send a message via Skype™ to OvidiuS
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 04-09-2015 , 10:08   Re: xPaw Source Query Class - Rcon problem
Reply With Quote #8

It's because you haven't opened the port you are trying to connect to, nothing is listening there.
__________________
Kia is offline
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 04-09-2015 , 13:18   Re: xPaw Source Query Class - Rcon problem
Reply With Quote #9

Quote:
Originally Posted by Kia View Post
It's because you haven't opened the port you are trying to connect to, nothing is listening there.
Kia there is server on port 27015 and port is opened.

Anyway, interesting thing is that i got it working. Actually my friend changed the source query library, and it finally worked.
https://github.com/kruvas/PHP-Source-Query-Class used this, and everything is working as it should.
xPaw library just doesn't work for me.
OvidiuS is offline
Send a message via Skype™ to OvidiuS
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 04-14-2015 , 15:40   Re: xPaw Source Query Class - Rcon problem
Reply With Quote #10

Your SQ_ENGINE should be set to GOLDSOURCE since you are not trying to use rcon on a Source server.

Last edited by xPaw; 04-14-2015 at 15:41.
xPaw is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode