problem with curl and port 8087

For general discussion of the Poker Mavens software
kadas99
Posts: 10
Joined: Fri May 09, 2014 6:35 pm

problem with curl and port 8087

Post by kadas99 »

Hello guys, we are facing a problem, we are using the API in order to get the information with a little modification, but this shouldn't be the problem, here is the curl code that we are using:

Code: Select all

    $curl = curl_init($url);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $params);
    curl_setopt($curl, CURLOPT_TIMEOUT, 30);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 
    curl_setopt($curl, CURLOPT_PORT,  8087);
    curl_setopt($curl, CURLOPT_VERBOSE, true);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    $response = trim(curl_exec($curl));
as you can see, the code shouldn't be the problem.

Some weird thing is, the use of it is fine over a local environment, but when I try to run this over the dedicated server this doesn't work, the error code is the next one: "Fatal error: Maximum execution time of 120 seconds exceeded in". I repeat, the code works in local environment (pointing to the hosting) but not in the hosting in self.

We are out of ideas at this moment, we tryed diff ports/configurations and nothing works. PMserver is running and listening on the 8087 port.

Thanks in advance.-
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: problem with curl and port 8087

Post by Kent Briggs »

kadas99 wrote:Some weird thing is, the use of it is fine over a local environment, but when I try to run this over the dedicated server this doesn't work
Is the PHP code hosted on a shared hosting service? If so, most likely that system has blocked all outbound traffic to any ports other than 80 or 443.
kadas99
Posts: 10
Joined: Fri May 09, 2014 6:35 pm

Re: problem with curl and port 8087

Post by kadas99 »

Hi Kent, thanks for the answer.

Sry but I don't understood, the game and the panel are over the dedicated server, was you asking that?

Thanks in advance
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: problem with curl and port 8087

Post by Kent Briggs »

kadas99 wrote:Sry but I don't understood, the game and the panel are over the dedicated server, was you asking that?
Is your PHP code on the same machine as poker server?
kadas99
Posts: 10
Joined: Fri May 09, 2014 6:35 pm

Re: problem with curl and port 8087

Post by kadas99 »

Hi Kent, yes, are both in the same machine.

I access to the panel from www.mysite.com:8087/admin or www.mysite.com/newadmin, are you thinking in a bottle neck? my head is burned at this time!

Thanks for the answers!
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: problem with curl and port 8087

Post by Kent Briggs »

kadas99 wrote:Hi Kent, yes, are both in the same machine.
Then I don't understand what you mean by "the code works in local environment (pointing to the hosting) but not in the hosting in self". What exactly is the difference here?
kadas99
Posts: 10
Joined: Fri May 09, 2014 6:35 pm

Re: problem with curl and port 8087

Post by kadas99 »

Hahaha, ok, from my local environmnet I can hit the server via API ($url = 123.456.789.123:8087) but when I upload the same code with the same API configuration, this doesn't work.


From my local machine

Code: Select all

$url = "http://123.456.789.123/api";     // <-- use your game server IP
  $pw = "mypassword";                    // <-- use your api password


  function Poker_API($url, $params, $assoc)
{
    $curl = curl_init($url);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $params);
    curl_setopt($curl, CURLOPT_TIMEOUT, 30);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 
    curl_setopt($curl, CURLOPT_PORT,  8087);
and I use the same configuration in the dedicated hosting.

Thanks for your help!
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: problem with curl and port 8087

Post by Kent Briggs »

kadas99 wrote:Hahaha, ok, from my local environmnet I can hit the server via API ($url = 123.456.789.123:8087) but when I upload the same code with the same API configuration, this doesn't work.
Where exactly are you uploading the code to?
kadas99
Posts: 10
Joined: Fri May 09, 2014 6:35 pm

Re: problem with curl and port 8087

Post by kadas99 »

Hi.
Kent Briggs wrote: Where exactly are you uploading the code to?
Here http://200.58.108.54
You can see the PM panel http://200.58.108.54:8087
And the one that we are trying to use too here http://200.58.108.54/newadmin/


Thanks for your time Kent!
kadas99
Posts: 10
Joined: Fri May 09, 2014 6:35 pm

Re: problem with curl and port 8087

Post by kadas99 »

Sry, I meant

Here http://200.58.108.54:80
You can see the PM panel http://200.58.108.54:8087/admin
And the one that we are trying to use too here http://www.lascoloniaspoker.net/newadmin/
Thanks for your time Kent!
Post Reply