Website canno't access server

For discussion of the Poker Mavens server module and other administration topics

Website canno't access server

Postby syyfilis » Mon Apr 06, 2015 10:21 am

Hello, i am running pokermavens pro and having problem with my website accessing server. Here is what i am doing:
User creates account on my website.
Php collects information and sends all the information with pokermaven api to the server
With $api->Error i am getting result: Failed to connect to /Server IP/ port 8087: Connection refused

IF i put /server IP/:8087 to my aadress bar i get connection to my server and i can play poker fine. If i make just /server IP/:8087/api?Username=....... i get the correct response.
Port 8087 and 8088 are open and on server machine there is no firewall or antivirus porgrams running..
I am wondering why i can play poker with my friends on the server but the website canno't access it..

Where do i have to look next?
syyfilis
 
Posts: 3
Joined: Mon Apr 06, 2015 10:02 am

Re: Website canno't access server

Postby Kent Briggs » Mon Apr 06, 2015 12:45 pm

syyfilis wrote:With $api->Error i am getting result: Failed to connect to /Server IP/ port 8087: Connection refused


Most likely, the web host where your php code is running has a firewall setting blocking outgoing connections. Typically they may block everything except port 80 and maybe port 443 for SSL. You'll need to get them to whitelist your file port. Make it clear that you need that for an outgoing connection to another server you own, not for an incoming connection to their server.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3826
Joined: Wed Mar 19, 2008 8:47 pm

Re: Website canno't access server

Postby syyfilis » Fri Apr 10, 2015 9:33 am

Aftter having web host open up te port im geting error: "Connection timed out after 30003 milliseconds".
Here is the code:

$params = array("Command" => "AccountsList", "Fields" => "Custom");
$api = Poker_API($params);
if($api->Result =="Ok"){
echo $api->Result;
}
else{
echo $api->Error;
}

The function Poker_API is copy-paste from your website with my api pw.
syyfilis
 
Posts: 3
Joined: Mon Apr 06, 2015 10:02 am

Re: Website canno't access server

Postby Kent Briggs » Fri Apr 10, 2015 9:50 am

syyfilis wrote:Aftter having web host open up te port im geting error: "Connection timed out after 30003 milliseconds".


Sounds like there is still a outbound firewall issue on your PHP site. Can you get a response from the API if you manually enter a command in your browser's URL box? If so, then the poker server end is fine. The 30-second timeout is specified in the Poker_API function in this line:

curl_setopt($curl, CURLOPT_TIMEOUT, 30);

You could increase that number but it shouldn't take anywhere near 30 seconds to get a response anyway.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3826
Joined: Wed Mar 19, 2008 8:47 pm

Re: Website canno't access server

Postby syyfilis » Fri Apr 10, 2015 10:05 am

I totaly solved the problem, it was still web host blocking the connection. Thanks for the help.
syyfilis
 
Posts: 3
Joined: Mon Apr 06, 2015 10:02 am


Return to Site Administration

Who is online

Users browsing this forum: No registered users and 6 guests

cron