I've created a module for my client's project that should send a file via FTPS onto a web-service. The web-service allows connection from some IP addresses only.
It works on my localhost, but some FTP-commands don't work on the client's live site.
For example, primarily I connect with ftp_ssl_connect. It works on the client's site.
Then, I log in with ftp_login. It also works on the client's site.
Then, I move to the passive mode with ftp_pasv. It also works on the live site.
But when I'm trying to get the files list with ftp_nlist command, it works on from my localhost but refuses to execute on the client's site.
Also, when I send a file with command ftp_put, it works on my localhost but refuses to work from the client's project.
$config = yrv_eboks_get_config_data();
$conn = ftp_ssl_connect($config->ftp_host, 21, 15);
if (ftp_login($conn, $config->ftp_login, $config->ftp_password)) {
if (ftp_pasv($conn, true)) {
$files = ftp_nlist($conn, ".");
var_dump($files);
}
} else {
// "Could not login via login via FTPS"
};
I don't know where is the problem and how to solve it.
Could you advise me, where can be the problem and what to do?