metaregistrar / php-epp-client

Object-oriented PHP EPP Client
https://www.metaregistrar.com/docs/
MIT License
209 stars 153 forks source link

Unable to connect to Openprovider #350

Closed DaveDrupsteen closed 11 months ago

DaveDrupsteen commented 1 year ago

First of all; thanks for an amazing library! Really useful.

We use several registrars and all seem to work except for Openprovider. The error I am getting is Failed to init CURL resource. but when using the logging parameter it does not give a definitive answer. I am using the following config:

        $conn = new \Metaregistrar\EPP\openproviderEppConnection(true);
        $conn->setHostname('epp.openprovider.eu');
        $conn->setUsername('username');
        $conn->setPassword('password');

It sets some output but for me nothing definitive:

==== LOG ==== -----WRITE-----2023-01-06 13:21:51----- XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 1.0 en urn:ietf:params:xml:ns:domain-1.0 urn:ietf:params:xml:ns:contact-1.0 http://www.openprovider.nl/epp/xml/opprov-1.0 63b8125fd3997 -----END-----2023-01-06 13:21:51----- -----WRITE-----2023-01-06 13:21:51----- Writing: 454 -----END-----2023-01-06 13:21:51----- 

Hopefully you can assist me.

DaveDrupsteen commented 1 year ago

Might be handy to mention what I am using: PHP 8.1.13 (cli) (built: Nov 22 2022 14:42:07) (NTS gcc x86_64) and the following modules:

[PHP Modules]
apcu
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
imagick
json
ldap
libxml
mbstring
memcached
msgpack
mysql
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
redis
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zlib

And running Oracle Linux 8.

DaveDrupsteen commented 1 year ago

Found the issue. PHP8+ doesn't return a resource anymore, but a object for curl_init. This triggers the following line https://github.com/metaregistrar/php-epp-client/blob/cf68cf3ee8cb42d62844676b8dc101bc5714a090/Protocols/EPP/eppHttpConnection.php#L110

Manually changing it seems to work.