This article mainly introduces the solution to the PHP_NETWORK_GETADDRESSES: GETADDRINFOFAILED problem. For more information, see ftp_connect, this function creates a new FTP connection. if a connection id is returned successfully, FALSE is returned if the connection fails.
Ftp_connect () opens an FTP connection. the host parameter is the server to be connected. The host must not end with a slash, nor must it start with ftp. The optional parameter port is the port number of the FTP server to be connected. if it is not set or 0, the default port 21 is used for connection.
When I run my program, the following error is reported:
The code is as follows: PHP Warning: ftp_connect (): php_network_getaddresses: getaddrinfo failed:
I often find that the problem is IPtables, so I opened the default FTP port, so it can be used normally.
In this case, you must first check the services on your server, and then the firewall.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service