G
G
Gennady2016-11-09 22:35:09
linux
Gennady, 2016-11-09 22:35:09

PHP 7: Unable to connect to FTP server from outside. What is wrong?

Hello. Debian has Nginx + PHP7.0-FPM + MariaDB bundle installed. For some reason, I can't connect to FTP via the MonstaFTP PHP script (both in the new version and in the old one) - if I specify an address like myftpsite.com when connecting, it won't connect. If I specify 192.168.0.1 or 127.0.0.1 as the address, then it works fine. In PHP5-FPM it was connected. What can be wrong?
The php7.0-ftp package is installed.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene Volf, 2016-11-09
@Wolfnsex

It would be nice to see a log with server errors or the script itself...
Most likely, the point is that either "an address like myftpsite.com" is not indicated on the IP: 192.168.0.1 or 127.0.0.1, or the script cannot match the address with the IP'shnik. You can check this by opening the command line and writing the following command there:
If you see that the ping is trying to reach IP 192.168.01 or 127.0.0.1, then the script cannot match the domain with the address. If there is some other IP there, then you are trying to connect to the wrong FTP server, which is located at 192.168.0.1. To locally register the mapping of the address (domain) to the IP'shnik - you can edit the fileC:\Windows\System32\drivers\etc\hosts

M
Max, 2016-11-09
@MaxDukov

so maybe it's in ftp? say, it is not available from the outside world. or only listens to a local address

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question