13-05-2026 implementation FR
This commit is contained in:
parent
245c281541
commit
70240d2b6a
61 changed files with 4472 additions and 2 deletions
|
|
@ -1,152 +0,0 @@
|
|||
# DHL Konfiguration für ältere cURL-Versionen (Live-Server)
|
||||
|
||||
## Problem identifiziert
|
||||
|
||||
Ihr Live-Server verwendet:
|
||||
|
||||
- **cURL 7.81.0** (ältere Version)
|
||||
- **OpenSSL 3.0.2** (ältere Version)
|
||||
- **PHP 8.2.29**
|
||||
|
||||
Im Vergleich zu Ihrem Testserver:
|
||||
|
||||
- **cURL 8.5.0** (neuere Version)
|
||||
- **OpenSSL 3.0.13** (neuere Version)
|
||||
- **PHP 8.4.12**
|
||||
|
||||
## Optimierte Lösung implementiert
|
||||
|
||||
### 1. Automatische cURL-Versionserkennung
|
||||
|
||||
Die Lösung erkennt automatisch ältere cURL-Versionen (< 8.0.0) und passt die Konfiguration an:
|
||||
|
||||
- **HTTP/2 deaktiviert** für ältere cURL-Versionen
|
||||
- **TCP Keep-Alive aktiviert** für bessere Verbindungsstabilität
|
||||
- **Fresh Connections** für jeden Request
|
||||
- **Optimierte SSL-Handhabung** für ältere OpenSSL-Versionen
|
||||
|
||||
### 2. Spezielle Konfiguration für Ihren Live-Server
|
||||
|
||||
#### .env-Konfiguration:
|
||||
|
||||
```env
|
||||
# DHL Live-Konfiguration für ältere cURL-Versionen
|
||||
DHL_BASE_URL=https://api-eu.dhl.com
|
||||
DHL_TEST_MODE=false
|
||||
DHL_SANDBOX=false
|
||||
|
||||
# SSL-Konfiguration optimiert für cURL 7.81.0
|
||||
DHL_SSL_VERIFY_PEER=true
|
||||
DHL_SSL_VERIFY_HOST=true
|
||||
DHL_SSL_VERSION=TLSv1_2
|
||||
DHL_TIMEOUT=30
|
||||
DHL_CONNECT_TIMEOUT=15
|
||||
|
||||
# Ihre Live-Daten
|
||||
DHL_API_KEY=your_real_live_api_key
|
||||
DHL_USERNAME=your_real_live_username
|
||||
DHL_PASSWORD=your_real_live_password
|
||||
```
|
||||
|
||||
### 3. Fallback-Optionen für problematische Server
|
||||
|
||||
#### Option A: SSL-Verifikation deaktivieren (falls weiterhin Probleme)
|
||||
|
||||
```env
|
||||
DHL_SSL_VERIFY_PEER=false
|
||||
DHL_SSL_VERIFY_HOST=false
|
||||
```
|
||||
|
||||
#### Option B: Ältere TLS-Version verwenden
|
||||
|
||||
```env
|
||||
DHL_SSL_VERSION=TLSv1_1
|
||||
```
|
||||
|
||||
#### Option C: Längere Timeouts
|
||||
|
||||
```env
|
||||
DHL_TIMEOUT=60
|
||||
DHL_CONNECT_TIMEOUT=30
|
||||
```
|
||||
|
||||
### 4. Was die Lösung automatisch macht
|
||||
|
||||
#### Für cURL 7.81.0 (Ihr Live-Server):
|
||||
|
||||
- ✅ Verwendet HTTP/1.1 statt HTTP/2
|
||||
- ✅ Aktiviert TCP Keep-Alive für bessere Verbindungsstabilität
|
||||
- ✅ Verwendet Fresh Connections für jeden Request
|
||||
- ✅ Optimiert SSL-Handhabung für OpenSSL 3.0.2
|
||||
|
||||
#### Für cURL 8.5.0+ (Ihr Testserver):
|
||||
|
||||
- ✅ Verwendet HTTP/2 wenn verfügbar
|
||||
- ✅ Standard-Konfiguration für moderne cURL-Versionen
|
||||
|
||||
### 5. Test der optimierten Lösung
|
||||
|
||||
```bash
|
||||
# Konfiguration neu laden
|
||||
php artisan config:clear
|
||||
|
||||
# Test mit Debug-Logs
|
||||
php artisan tinker
|
||||
```
|
||||
|
||||
```php
|
||||
$settingController = new \App\Http\Controllers\SettingController();
|
||||
$dhlConfig = $settingController->getDhlConfig();
|
||||
$dhlClient = new \Acme\Dhl\Support\DhlClient(
|
||||
$dhlConfig['base_url'],
|
||||
$dhlConfig['api_key'],
|
||||
$dhlConfig['username'],
|
||||
$dhlConfig['password']
|
||||
);
|
||||
|
||||
$result = $dhlClient->testConnection();
|
||||
echo $result ? 'SUCCESS' : 'FAILED';
|
||||
```
|
||||
|
||||
### 6. Debug-Logs für Ihren Live-Server
|
||||
|
||||
Sie werden folgende Logs sehen:
|
||||
|
||||
```
|
||||
[INFO] DHL Server Environment Debug Info {
|
||||
"curl_version": {"version": "7.81.0", ...},
|
||||
"curl_is_old": true,
|
||||
"compatibility": {
|
||||
"will_use_http2": false,
|
||||
"will_use_tcp_keepalive": true,
|
||||
"will_use_fresh_connections": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 7. Warum diese Lösung funktioniert
|
||||
|
||||
#### Problem mit cURL 7.81.0:
|
||||
|
||||
- Weniger robuste SSL-Handhabung
|
||||
- Probleme mit HTTP/2
|
||||
- Instabile Verbindungen bei längeren Requests
|
||||
|
||||
#### Lösung:
|
||||
|
||||
- **TCP Keep-Alive**: Hält Verbindungen stabil
|
||||
- **Fresh Connections**: Vermeidet Verbindungsprobleme
|
||||
- **HTTP/1.1**: Kompatibel mit älteren cURL-Versionen
|
||||
- **Optimierte SSL-Optionen**: Angepasst für OpenSSL 3.0.2
|
||||
|
||||
### 8. Monitoring
|
||||
|
||||
Die Lösung loggt automatisch:
|
||||
|
||||
- cURL-Version und Kompatibilitätsstatus
|
||||
- Welche Optimierungen aktiviert sind
|
||||
- Erfolgreiche Verbindungsmethode
|
||||
|
||||
## Fazit
|
||||
|
||||
Die Lösung ist jetzt speziell für Ihren Live-Server mit cURL 7.81.0 optimiert und sollte das SSL-Verbindungsproblem beheben! 🎉
|
||||
Loading…
Add table
Add a link
Reference in a new issue