Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the PHP_NETWORK_GETADDRESSES: GETADDRINFO FAILED problem

Shulou Source: shulou.com Published: 2022-06-03 08:09:06 11月15日 Update

This article focuses on "how to solve the PHP_NETWORK_GETADDRESSES: GETADDRINFO FAILED problem". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to solve the PHP_NETWORK_GETADDRESSES: GETADDRINFO FAILED problem.

When doing FTP data collection, you need to use a PHP function ftp_connect, which is to establish a new FTP connection. If you successfully return a connection ID, if you fail, you will return FALSE.

Ftp_connect () opens a FTP connection with the parameter host as the server to connect to. The host should not end with a slash and the front does not need to start with ftp://. The 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 will be used to connect.

When I went to execute my program, I found that the error was as follows:

The copy code is as follows:

PHP Warning: ftp_connect (): php_network_getaddresses: getaddrinfo failed:

Often later, I found out that there was a problem with IPtables, so I opened the default port of FTP, so I could use it normally.

When you encounter this kind of problem, you should first check the service of your own server, and then the firewall problem.

At this point, I believe you have a deeper understanding of "how to solve the PHP_NETWORK_GETADDRESSES: GETADDRINFO FAILED problem". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Questions services code content functions parameters time servers ports learning practicality deeper success interests slogans practicality practicality that is at the beginning the operation is simple Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information OPPO Reno Docker Xiaomi Microsoft