1. Error: dns_get_record(): DNS Query failed. See Figure 1.

$records = dns_get_record($host, DNS_SRV);
2. Print $host, its value is: https://object-wp.local/WP_ADMIN_USERNAME=admin
3. Open https://object-wp.local/WP_ADMIN_USERNAME=admin in the browser, the response is 404. However, it is confirmed that https://object-wp.local is supported. See Figure 2.

4. When it starts with http://, the error still occurs: Warning: dns_get_record(): DNS Query failed. See Figure 3.

<?php
$host = 'http://object-wp.local/WP_ADMIN_USERNAME=admin';
$records = dns_get_record($host, DNS_SRV);
?>5. Open http://object-wp.local/WP_ADMIN_USERNAME=admin in the browser, the response is 404. It is confirmed that https://object-wp.local is not supported. The web server is not listening on port 80. See Figure 4.

6. Refer to configuring a single server for HTTP and HTTPS traffic. https://nginx.org/en/docs/http/configuring_https_servers.html .
server {
listen 80;
listen 443 ssl;
}
7. Open http://object-wp.local/WP_ADMIN_USERNAME=admin in the browser, the response is 404. However, it is confirmed that http://object-wp.local is now supported. See Figure 5.

8. When it starts with http://, the error still occurs: Warning: dns_get_record(): DNS Query failed.
<?php
$host = 'http://object-wp.local/WP_ADMIN_USERNAME=admin';
$records = dns_get_record($host, DNS_SRV);
?>9. When it does not start with http://, only the pure domain name remains, and the error no longer occurs. The result is an empty array.
<?php
$host = 'object-wp.local';
$records = dns_get_record($host, DNS_SRV);
print_r($records);
?>Array
(
)
10. When it does not start with http://, only the pure domain name remains, and the DNS_SRV parameter is removed. The error no longer occurs. The result is not an empty array. See Figure 6.

<?php
$host = 'object-wp.local';
$records = dns_get_record($host);
print_r($records);
?>
Array
(
[0] => Array
(
[host] => object-wp.local
[class] => IN
[ttl] => 604800
[type] => A
[ip] => 127.0.0.1
)
)
11. This confirms that there is an issue with the processing logic of the program code. At the very least, it indicates that the corresponding configuration with https:// is not supported.
