When calling an external service request, PHP addresses: getaddrinfo failed: Name or Servicenot Known with an error:The reason:
PHP host cannot connect to DNS server
PHP host cannot connect to DNS server
Analysis: such as the services you access request is www.leyangjuntestxxxx.com
You can first ping or Telnet the domain name to see if it is accessible, if it is responsive
Failure to ping indicates that your service is now connected to a problematic DNS server
General solutions:
One: It is necessary to check whether the remote host of the request is in /etc/hosts of the native host
Two: the need to check the rules of the firewall, is not intercepted by the response
Three: You can manually bind host in the /etc/hosts file
Read More:
- How to Hide index.php
- PHP: How to parse MHT file into HTML
- How to Solve PHP Error: no package’oniguruma’ found
- php Error: mail() Failed to connect to mailserver at “localhost” port 25
- Error during session start; please check your PHP and/or webserver log file and configure your PHP
- How to Solve PHP Fatal error: Namespace declaration statement has to be the very first statement
- [Solved] PHP Error: Warning: file_get_contents(): Failed to enable crypto
- PHP: How to get the total number of data in the MySQL table (total number of rows)
- Using $this when not in object context in (How to Fix)
- PHP file download, download failed, nginx open() nginx / fastcgi_ temp/2/10/0000000102“ failed (13: Permission denied)
- [Solved] Postman Error: Error: getaddrinfo ENOTFOUND
- [PHP] Solve PHP Call to undefined function ldap_connect()
- [Solved] WordPress Upgrade PHP 5.6 to 7.x Fatal error: Uncaught Error: Call to undefined function mysql_connect()
- PHP encryption 3DES error Call to undefined function: mcrypt_module_open() solution
- [Solved] PHP getimagesize(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL
- PHP Error Object of class mysqli could not be converted to string in
- [WordPress Error] Fatal error undefined function is_network_admin()
- PHP error in Windows: class’ mysqli ‘not found
- PHP curl error: SSL certificate problem: unable to get local issuer certificate settlement program
- [Solved] PHP installation Phalcon expansion error