fernwerker / ownDynDNS

Self-hosted dynamic DNS php script for FRITZ!Box and netcup DNS API
GNU General Public License v3.0
138 stars 35 forks source link

'SoapClient' not found in dnsapi.php:35 #1

Closed wuha closed 5 years ago

wuha commented 6 years ago

I'm trying to make the script work. Unfortunately I get the following error in the nginx log when calling the URL via the browser:

2018/09/27 14:30:44 [error] 8579#8579: *10 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class 'SoapClient' not found in /var/www/dnsupdater/dnsapi.php:35 Stack trace:

0 /var/www/dnsupdater/dnsapi.php(125): DomainWebserviceSoapClient::_Call('login', Array)

1 /var/www/dnsupdater/update.php(119): DomainWebserviceSoapClient->login('1111', '...', '...', '...')

2 {main}

thrown in /var/www/dnsupdater/dnsapi.php on line 35" while reading response header from upstream, client: 192.168.178.201, server: 192.168.178.82, request: "GET /update.php?user=user&password=passwd3&ipv4=79.229.156.212&ipv6=fe80::5054:ff:fe48:3130&domain=test.my.tld HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "192.168.178.82"

Any ideas?

fernwerker commented 6 years ago

Seems to be a problem with the login procedure at the netcup DNS API. Did you

Can you provide the log of the DNS api that is accessible in the netcup CCP?

dani9 commented 6 years ago

Try to install the PHP SOAP extension.

If you use Ubuntu, you can install it via: sudo apt-get install php-soap

fernwerker commented 6 years ago

@wuha did this help so I can close this issue?

ku-we commented 5 years ago

Installing the PHP SOAP extension solves this problem. When using php-fpm as docker container php-soap can be installed with a custom Dockerfile:

FROM php:fpm  
RUN apt-get update && \
    apt-get install -y libxml2-dev && \
    docker-php-ext-install soap