Lnmp,dns set error, curl arbitrary address errors:
Couldn't resolve host 'example.com'
file_get_contents
Error:
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
- Direct normal in Shell
curl -I http://example.com
, ping is normal
- Invalid Curl setting
CURL_IPRESOLVE_V4
Reply content:
Lnmp,dns set error, curl arbitrary address errors:
Couldn't resolve host 'example.com'
file_get_contents
Error:
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
- Direct normal in Shell
curl -I http://example.com
, ping is normal
- Invalid Curl setting
CURL_IPRESOLVE_V4
I have a question that your example.com replaced with the domain name you specifically need not. Sometimes, the carrier's DNS server may not have a corresponding IP address mapping relationship, so the site cannot be found.
All right... Find the problem, PHP running in the chroot environment, turn off the good.