Php_network_getaddresses:getaddrinfo failed problem Solving _php tutorial

Source: Internet
Author: User
Tags ftp connection
When doing FTP data acquisition, 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 will return FALSE.
Ftp_connect () opens an FTP connection with the parameter host being 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 ftp://. Optional parameter port is the port number of the FTP port to which you want to connect, and if it is not set or 0, the default ports 21来 connection will be used.
When I went to execute my program, I found the following error:
Copy CodeThe code is as follows: PHP Warning:ftp_connect (): Php_network_getaddresses:getaddrinfo failed:
Often later found to be the problem of iptables, so I opened the FTP default port, so it can be used normally.
The problem is to check the service of your server first, and then the firewall problem.

http://www.bkjia.com/PHPjc/764613.html www.bkjia.com true http://www.bkjia.com/PHPjc/764613.html techarticle when doing FTP data acquisition, 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 will return FALSE ...

  • 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.