Skip to content

Commit bf20bd6

Browse files
committed
hostAttr fixes; documentation update
1 parent 0eed121 commit bf20bd6

File tree

7 files changed

+754
-425
lines changed

7 files changed

+754
-425
lines changed

README.md

Lines changed: 67 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,37 @@ The client also provides EPP modules for WHMCS and FOSSBilling, supporting all e
1010

1111
## Installation
1212

13-
To begin, simply follow the steps below. This installation process is optimized for a VPS running Ubuntu 22.04/24.04 or Debian 12.
13+
To begin, follow these steps for setting up the EPP Client. This installation process is optimized for a VPS running Ubuntu 22.04/24.04 or Debian 12.
1414

15-
1. Navigate to your project directory and run the following command:
15+
### 1. Install PHP
1616

17-
```composer require pinga/tembo```
17+
Make sure PHP is installed on your server. Use the appropriate commands for your operating system.
1818

19-
2. In your PHP code, include the **Connection.php** file from the Tembo package:
20-
21-
```
22-
require_once 'Connection.php';
19+
```bash
20+
apt install -y curl software-properties-common ufw
21+
add-apt-repository ppa:ondrej/php
22+
apt update
23+
apt install -y bzip2 composer git net-tools php8.3 php8.3-bz2 php8.3-cli php8.3-common php8.3-curl php8.3-fpm php8.3-gd php8.3-gmp php8.3-imagick php8.3-intl php8.3-mbstring php8.3-opcache php8.3-readline php8.3-soap php8.3-xml unzip wget whois
2324
```
2425

25-
3. To create test certificates (cert.pem and key.pem), if the registry does not have mandatory SSL certificates, you can use:
26+
### 2. Install Tembo Package
2627

27-
```
28-
openssl genrsa -out key.pem 2048
29-
```
28+
Navigate to your project directory and run the following command:
3029

31-
```
32-
openssl req -new -x509 -key key.pem -out cert.pem -days 365
30+
```bash
31+
composer require pinga/tembo
3332
```
3433

35-
4. You can now use the EppClient class and its functions in your code. You can refer to the **examples** directory for examples of how the package can be used.
34+
### 3. Configure Access to the Registry
3635

37-
5. To test if you have access to the EPP server from your system, you may use:
36+
Edit the `examples/Connection.php` file to configure your registry access credentials.
37+
If the registry requires SSL certificates and you don't have them, refer to the troubleshooting section for steps to generate `cert.pem` and `key.pem`.
3838

39-
```
40-
openssl s_client -showcerts -connect epp.example.com:700
41-
```
39+
### Using the EPP Client
4240

43-
```
44-
openssl s_client -connect epp.example.com:700 -CAfile cacert.pem -cert cert.pem -key key.pem
45-
```
41+
- You can use the commands provided in the `examples` directory to interact with the EPP server.
42+
43+
- Alternatively, include the `Connection.php` file in your project and build your custom application using the `EppClient` class and its functions.
4644

4745
## Supported EPP Commands
4846

@@ -114,9 +112,9 @@ openssl s_client -connect epp.example.com:700 -CAfile cacert.pem -cert cert.pem
114112
| Registro.it | .it | IT || |
115113
| RoTLD | .ro | || |
116114
| RyCE | all | || |
117-
| SIDN | all | || more tests |
115+
| SIDN | all | || |
118116
| SWITCH | .ch, .li | || |
119-
| Traficom | .fi | FI || only org contacts; more tests |
117+
| Traficom | .fi | FI || only org contacts |
120118
| Verisign | all | VRSN || |
121119
| ZADNA | .za | || |
122120
| ZDNS | all | || |
@@ -141,4 +139,49 @@ Would you like to see any registry added as a WHMCS/FOSSBilling module? Or an EP
141139
| AFNIC | .fr/others || [fossbilling-epp-fr](https://github.com/getpinga/fossbilling-epp-fr) |
142140
| Caucasus Online | .ge || [fossbilling-epp-ge](https://github.com/getpinga/fossbilling-epp-ge) |
143141
| FRED | .cz/any || [fossbilling-epp-fred](https://github.com/getpinga/fossbilling-epp-fred) |
144-
| Hostmaster | .ua || [fossbilling-epp-ua](https://github.com/getpinga/fossbilling-epp-ua) |
142+
| Hostmaster | .ua || [fossbilling-epp-ua](https://github.com/getpinga/fossbilling-epp-ua) |
143+
144+
## Troubleshooting
145+
146+
## EPP Server Access
147+
148+
If you're unsure whether your system can access the EPP server, you can test the connection using OpenSSL. Try one or both of the following commands:
149+
150+
1. Basic Connectivity Test:
151+
152+
```bash
153+
openssl s_client -showcerts -connect epp.example.com:700
154+
```
155+
156+
2. Test with Client Certificates:
157+
158+
```bash
159+
openssl s_client -connect epp.example.com:700 -CAfile cacert.pem -cert cert.pem -key key.pem
160+
```
161+
162+
Replace `epp.example.com` with your EPP server's hostname and adjust the paths to your certificate files (`cacert.pem`, `cert.pem`, and `key.pem`) as needed. These tests can help identify issues with SSL/TLS configurations or network connectivity.
163+
164+
## Generating an SSL Certificate and Key
165+
166+
If you do not have an SSL certificate and private key for secure communication with the registry, you can generate one using OpenSSL.
167+
168+
```bash
169+
openssl genrsa -out key.pem 2048
170+
openssl req -new -x509 -key key.pem -out cert.pem -days 365
171+
```
172+
173+
**Note:** For production environments, it's recommended to use a certificate signed by a trusted Certificate Authority (CA) instead of a self-signed certificate.
174+
175+
## EPP-over-HTTPS Issues
176+
177+
If you experience login or other issues with EPP-over-HTTPS registries such as `.eu`, `.fi`, `.hr`, `.it`, or `.lv`, it might be caused by a corrupted or outdated cookie file. Follow these steps to fix it:
178+
179+
```bash
180+
rm -f /tmp/eppcookie.txt
181+
```
182+
183+
After deleting the cookie file, try logging in again. This will force the creation of a new cookie file and may resolve the issue.
184+
185+
## Need More Help?
186+
187+
If the steps above don’t resolve your issue, refer to the EPP Client logs (`/path/to/tembo/log`) to identify the specific problem.

examples/DomainUpdateNS.php

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Tembo EPP client test file
44
*
5-
* Written in 2023 by Taras Kondratyuk (https://getpinga.com)
5+
* Written in 2024 by Taras Kondratyuk (https://getpinga.com)
66
* Based on xpanel/epp-bundle written in 2019 by Lilian Rudenco ([email protected])
77
*
88
* @license MIT
@@ -18,8 +18,24 @@
1818

1919
$params = array(
2020
'domainname' => 'test.example',
21+
// Comment these lines and uncomment the block below if the TLD requires <domain:hostAttr> with IP addresses:
2122
'ns1' => 'ns1.example.com',
22-
'ns2' => 'ns2.example.com'
23+
'ns2' => 'ns2.example.com',
24+
/* Uncomment the following block for TLDs requiring <domain:hostAttr> with IP addresses:
25+
'nss' => array(
26+
array(
27+
'hostName' => 'ns1.example.com',
28+
'ipv4' => '192.168.1.1',
29+
'ipv6' => '2001:db8::1'
30+
),
31+
array(
32+
'hostName' => 'ns2.example.com',
33+
'ipv4' => '192.168.1.2'
34+
),
35+
array(
36+
'hostName' => 'ns3.example.com'
37+
)
38+
), */
2339
);
2440
$domainUpdateNS = $epp->domainUpdateNS($params);
2541

0 commit comments

Comments
 (0)