metaregistrar / php-epp-client

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

Error 2004 - eppCheckDomainRequest - IIS #180

Closed Foolson closed 5 years ago

Foolson commented 5 years ago

When i try do do a domain check I get error 2004 as the answer from IIS.

Have I forgot to add anything?

PHP code used:

<?php
require __DIR__ . '/autoloader.php';
$conn = new Metaregistrar\EPP\eppConnection();
$conn = Metaregistrar\EPP\eppConnection::create(__DIR__ . '/settings.ini', true);
$conn->setLogFile(__DIR__ . '/epp.log');
$domains = [
        'google.se',
        'sasfasgadfgadfg.se'
];
if ($conn->login(true)) {
        echo "Successfully logged in!\n";
        $check = new Metaregistrar\EPP\eppCheckDomainRequest($domains);
        $response = $conn->request($check);
        if ($conn->logout()) {
                echo "Successfully logged out!\n";
        }
}
?>

PHP output:

Successfully logged in!
PHP Fatal error:  Uncaught Metaregistrar\EPP\eppException: Error 2004: Parameter value range error; domainname:google.se (Value error name) in /home/jo/git/php-epp-client/Protocols/EPP/eppResponses/eppResponse.php:188
Stack trace:
#0 /home/jo/git/php-epp-client/Protocols/EPP/eppConnection.php(418): Metaregistrar\EPP\eppResponse->Success()
#1 /home/jo/git/php-epp-client/test.php(15): Metaregistrar\EPP\eppConnection->request(Object(Metaregistrar\EPP\eppCheckDomainRequest))
#2 {main}
  thrown in /home/jo/git/php-epp-client/Protocols/EPP/eppResponses/eppResponse.php on line 188

EPP log:

-----Connection made-----2019-02-15 11:17:49-----
Stream opened with protocol TLSv1.2, cipher ECDHE-RSA-AES256-GCM-SHA384, 256 bits TLSv1.2
-----END-----2019-02-15 11:17:49-----

-----WRITE-----2019-02-15 11:17:49-----
<?xml version="1.0" encoding="UTF-8"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <command>
    <login>
      <clID>XXXXXXXXXXXXXXXX</clID>
      <pw>XXXXXXXXXXXXXXXX</pw>
      <options>
        <version>1.0</version>
        <lang>en</lang>
      </options>
      <svcs>
        <objURI>urn:ietf:params:xml:ns:domain-1.0</objURI>
        <objURI>urn:ietf:params:xml:ns:contact-1.0</objURI>
        <objURI>urn:ietf:params:xml:ns:host-1.0</objURI>
        <svcExtension>
          <extURI>urn:ietf:params:xml:ns:secDNS-1.1</extURI>
          <extURI>urn:se:iis:xml:epp:iis-1.2</extURI>
        </svcExtension>
      </svcs>
    </login>
    <clTRID>5c6691cd9c161</clTRID>
  </command>
</epp>

-----END-----2019-02-15 11:17:49-----

-----READ-----2019-02-15 11:17:49-----
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd">
    <response>
        <result code="1000">
            <msg>Command completed successfully</msg>
        </result>
        <trID>
            <clTRID>5c6691cd9c161</clTRID>
            <svTRID>218598728</svTRID>
        </trID>
    </response>
</epp>

-----END-----2019-02-15 11:17:49-----

-----LOGIN-----2019-02-15 11:17:49-----
Logged in
-----END-----2019-02-15 11:17:49-----

-----WRITE-----2019-02-15 11:17:49-----
<?xml version="1.0" encoding="UTF-8"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:domain="urn:ietf:params:xml:ns:domain-1.0" xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" xmlns:host="urn:ietf:params:xml:ns:host-1.0" xmlns:secDNS="urn:ietf:params:xml:ns:secDNS-1.1" xmlns:iis="urn:se:iis:xml:epp:iis-1.2">
  <command>
    <check>
      <domain:check>
        <domain:name>google.se</domain:name>
        <domain:name>sasfasgadfgadfg.se</domain:name>
      </domain:check>
    </check>
    <clTRID>5c6691cddf9c4</clTRID>
  </command>
</epp>

-----END-----2019-02-15 11:17:49-----

-----READ-----2019-02-15 11:17:50-----
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd">
    <response>
        <result code="2004">
            <msg>Parameter value range error</msg>
            <extValue>
                <value>
                    <dom:name xmlns:dom="urn:ietf:params:xml:ns:domain-1.0">google.se</dom:name>
                </value>
                <reason>Value error name</reason>
            </extValue>
        </result>
        <trID>
            <clTRID>5c6691cddf9c4</clTRID>
            <svTRID>218598730</svTRID>
        </trID>
    </response>
</epp>

-----END-----2019-02-15 11:17:50-----
metaregistrar commented 5 years ago

No, the EPP conversation looks perfectly normal, no strange texts or fields. As to why IIS.SE does not accept google.se as a domain name, you should ask the Registry. registry@internetstiftelsen.se

Foolson commented 5 years ago

I misunderstood how the EPP testserver works.

IIS sends that answer because the object does not exist.