Php_network_getaddresses:getaddrinfo failed Problem Solving method _php Skills

Source: Internet
Author: User
Tags ftp connection
In doing FTP data collection, you need to use a PHP function Ftp_connect, this function is to establish a new FTP connection, if the successful return of a connection identity, failure returns FALSE.
Ftp_connect () opens an FTP connection with the parameter host as the server to which you want to connect. The host should not end with a slash, and the front does not need to start with a ftp://. Optional parameter port is the port number of the FTP to which you want to connect, if it is not set or 0, the default port 21来 connection is used.
When I went to execute my program, I found the following error:
Copy Code code as follows:
PHP warning:ftp_connect (): Php_network_getaddresses:getaddrinfo failed:

Often found after the problem is iptables, so I opened the FTP default port, so it can be used normally.
Encounter this kind of problem to check the service of own server first, second is firewall problem.

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.