-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cant connect to PowerdDNS - php fatal error #11
Comments
Hi @tkald, Can you add |
Thank you, @trizz ! Added logger line to php and got 400 error:
Tried same payload/headers directly with curl - no problem creating content. |
Unfortunatly, I can not reproduce this specific error. I've used the exact same code as you've posted above, but all without errors. I've pushed a new branch with a possible fix for the 'Uncaught Error' and a fix for the wrong PTR field. Can you try that branch and see if a more clear error is returned? According to the API documentation it is possible that you're code is not sending the data in UTF8, but I can't validate that.
If you need to define a different port, it can be done when constructing the client, there is no need to change the package source for that: $powerdns = new Powerdns('192.168.40.175', 'redacted_key', 8081); |
thaks @trizz ! Switched to new branch.
|
Did some network packet capture comparisons with curl post request and noticed that with curl header Content-Type => application/x-www-form-urlencoded is added.
And voila, example.com domain got created to my PDSN. |
I've updated my branch. Can you validate that the client is working for you as expected? |
Yes, all good. Thank you @trizz ! |
@tkald A new version is published! |
Detailed description
Seems like I can't connect to PDNS api - even though everything seems correct.
Changed also api port to 8081 in /src/Powerdns.php file.
cat add.php
Your environment
Ubuntu 18.04
PHP 7.2.19-0ubuntu0.18.04.1 (cli)
powerdns-php v 1.0
pdns-server v 4.1.10-1pdns.xenial
The text was updated successfully, but these errors were encountered: