EPP connection timeout on remote server, works on Wamp

407 Views Asked by At

I'm trying to connect to an EPP-server with PHP, and it's all working on the Wampserver (PHP 5.5.12) on my pc. I've written a class and connect with this piece of code:

    if(!$this->socket = stream_socket_client('tls://'.$this->host.':'.$this->port, $errno, $errstr, 10, STREAM_CLIENT_CONNECT)){
        return false;
    }

But when I try the same class on my remote webserver (PHP 5.3.10), it gives a "Connection timed out" error. The ip-address is whitelisted at the registry, so this shouldn't be the problem.

I figured out that the problem might be the SSL-settings, but I expected another error if that's the case. I've already tried:

    $fc = stream_context_create(array('ssl' => array('verify_peer' => false)));
    if(!$this->socket = stream_socket_client('tls://'.$this->host.':'.$this->port, $errno, $errstr, 10, STREAM_CLIENT_CONNECT, $fc)){
        return false;
    }

And

    $fc = stream_context_create(array('ssl' => array('allow_self_signed' => true, 'local_cert' => 'client.pem')));
    if(!$this->socket = stream_socket_client('tls://'.$this->host.':'.$this->port, $errno, $errstr, 10, STREAM_CLIENT_CONNECT, $fc)){
        return false;
    }

But I keep getting the "Connection timed out" error. Any thoughts about this?

0

There are 0 best solutions below