• Print

Author Topic: RCON Help!  (Read 5131 times)

0 Members and 1 Guest are viewing this topic.

Offline Samg381

  • Newbie
  • *
  • Posts: 32
  • Karma: 0
  • Owner- Samg381's Sandbox
    • Samg381's Sandbox Server
RCON Help!
« on: March 23, 2013, 07:05:14 am »
Hello,
I am having some difficulty with an RCON Command that is being sent from my website
through an auto donate PHP code. Once you have donated, it sends the RCOn command
like this:


  define
'SQ_SERVER_ADDR''xx.xxx.xxx.xx' );
    
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'xxxxxxxx' );
        
$Query->Rcon 'say A donation has been received from SteamID: '.$steamid.'. Donation amount: '.$amount.'$.' );
        
$Query->Rcon 'ulx adduserid '.$steamid.' donator' );



But, for some reason whenever I test it, I get this error when the RCON runs:

Code: [Select]
Can't connect to RCON server: Connection timed out

The webserver connects fine with PayPal, and I can ping it and what not, and all of the required ports are open on my gameserver.


Please help!
This is realtime!




www.samg381.com/donate.php

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: RCON Help!
« Reply #1 on: March 23, 2013, 07:42:20 am »
Should the SQ_SERVER_PORT variable definition, and perhaps timeout also be in ' ' ?
Been long time since I tinkered with PHP (~10 years), but looking at the definitions, it seemed off.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Samg381

  • Newbie
  • *
  • Posts: 32
  • Karma: 0
  • Owner- Samg381's Sandbox
    • Samg381's Sandbox Server
Re: RCON Help!
« Reply #2 on: March 23, 2013, 08:00:00 am »
That's what I thought! Can you tell me what I should change?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: RCON Help!
« Reply #3 on: March 23, 2013, 08:09:55 am »
Really, you don't know what I mean?
Try changing
Code: PHP
  1.  define( 'SQ_SERVER_PORT', 27015 );
  2.  define( 'SQ_TIMEOUT',     1 );
  3.  
to
Code: PHP
  1. define( 'SQ_SERVER_PORT', '27015' );
  2. define( 'SQ_TIMEOUT',     '1' );
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Samg381

  • Newbie
  • *
  • Posts: 32
  • Karma: 0
  • Owner- Samg381's Sandbox
    • Samg381's Sandbox Server
Re: RCON Help!
« Reply #4 on: March 23, 2013, 08:47:37 am »
Now if only I could test it :P
Need money. PayPal sandbox doesn't work.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: RCON Help!
« Reply #5 on: March 23, 2013, 08:43:38 pm »
Seems to me it should work, if Paypal has a sandbox or test to make sure <x> automated system works, it should be able to be tested.
I'd hate to pay money to any <insert paypal payment accepted system here> and find out whatever I was supposed to get didn't happen.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

  • Print