A temporary server error occurred
| Request #73149 | dns_get_record(): A temporary server error occurred | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2016-09-23 14:36 UTC | Modified: | 2025-02-24 19:22 UTC |
|
||||||||||
| From: | walter at oradio dot be | Assigned: | bukka (profile) | |||||||||||
| Status: | Assigned | Package: | Network related | |||||||||||
| PHP Version: | 5.6.26 | OS: | Linux Mint 17 Qiana and Centos 7 | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2016-09-23 14:36 UTC] walter at oradio dot be
Description: ------------ [regression] dns_get_record does not return false on dns server failure When doing a nslookup for this domain: radioantwerpen.be the response is: ;; Got SERVFAIL reply from 83.149.80.123, trying next server Server: 83.149.80.123 Address: 83.149.80.123#53 ** server can't find radioantwerpen.be: NXDOMAIN Note: ----- This worked on PHP version 5.5x, but when I upgraded to 5.6.26 this error occurred. The same error occurs on the production server, which is a different machine with a different OS, but same PHP version. This is a regression from bug: #53092 ( https://bugs.php.net/bug.php?id=53092 ) . It was closed in 2014. Test script: --------------- $url = "radioantwerpen.be"; $result = dns_get_record($url); print_r($result); Expected result: ---------------- return empty array Actual result: -------------- throws "Warning: dns_get_record(): A temporary server error occurred. in ..." and returns nothing (no array)
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2021-02-24 15:30 UTC] idem84 at me dot com
[2021-05-28 11:24 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
[2021-06-06 04:22 UTC] php-bugs at lists dot php dot net
[2021-07-15 10:30 UTC] e6990620 at gmail dot com
This error is due to the fact that the default value for the $type argument is DNS_ANY, which is ignored by most DNS servers. dns_get_record('radioantwerpen.be') doesn't work, but dns_get_record('radioantwerpen.be', DNS_A) does. Source: https://dustri.org/b/a-short-tale-on-phps-dns_get_record.html[2021-07-15 10:42 UTC] cmb@php.net
-Status: No Feedback +Status: Open -Type: Bug +Type: Documentation Problem -Assigned To: cmb +Assigned To:
[2021-07-15 10:42 UTC] cmb@php.net
[2021-11-08 11:06 UTC] max at nextcloud dot com
[2023-04-20 08:33 UTC] dewald at appturelab dot com
[2023-07-10 02:47 UTC] josh dot t dot richards at gmail dot com
[2024-03-16 10:36 UTC] tummen at jgd dot se
I get this error when asking duckdns dor dynamic lookup that fails Warning:"A temporary server error occurred" if php has flag show all this will show as an error with E_WARNING status this is my workaround: function NoWarnings($errno, $errstr, $errfile, $errline){ return true; } $oldhandler = set_error_handler('NoWarnings', E_WARNING ); $dns = dns_get_record( $dnsname ); set_error_handler( $oldhandler, E_WARNING ); @ does not supress the Warning[2025-02-24 19:22 UTC] bukka@php.net
-Type: Documentation Problem +Type: Feature/Change Request -Assigned To: +Assigned To: bukka
[2025-02-24 19:22 UTC] bukka@php.net