I have been using these two functions, in particular ftp_get_nlist, for 3-4 years in an XBASIC function called from a button on a UX Component. I've never had any issues. All of a sudden, about a week ago, they seem to have stopped working: ftp_get_nlist simply returns with an empty list (even though there are many files on the server) and ftp_get_file reports that it cannot log in (with credentials I know to be valid).
I asked the people who maintain the FTP server if anything has changed in the last week, they insist not. I've done some testing by trying to access the site through an FTP client (FileZilla) and find that I CAN access it if I set the mode to "Use plain FTP (insecure)". But if the mode is to use "Explicit FTP over TLS if available" I can't connect. In particular, I get the messages
TLS connection established.
Status: Logged in
Status: Retrieving directory listing...
Status: Server sent passive reply with unroutable address. Using server address instead.
Command: MLSD
Response: 150 Opening BINARY mode data connection for MLSD.
Error: The data connection could not be established: ECONNREFUSED - Connection refused by server
I've tried using ftp_get_file with other sites, ones that FileZilla CAN access using the Explicit FTP setting, and ftp_get_file has no problems (well, there is a problem with whether or not path names are allowed, but that's another matter). So I looked for additional info on ftp_get_file (e.g. what mode(s) it uses) but couldn't find anything. Again, ftp_get_file seems to have access to the same set of sites FileZilla does when the latter's mode is set to Explicit FTP over TLS, but can't access a site that FileZilla can only access with the plain FTP setting (if that makes any sense).
Does anyone know or know where I can find info on what kind of modes ftp_get_file and ftp_get_nlist use by default and if they can be changed? Or am I completely off-base here?
Thanks in advance for any info.
Norman
I asked the people who maintain the FTP server if anything has changed in the last week, they insist not. I've done some testing by trying to access the site through an FTP client (FileZilla) and find that I CAN access it if I set the mode to "Use plain FTP (insecure)". But if the mode is to use "Explicit FTP over TLS if available" I can't connect. In particular, I get the messages
TLS connection established.
Status: Logged in
Status: Retrieving directory listing...
Status: Server sent passive reply with unroutable address. Using server address instead.
Command: MLSD
Response: 150 Opening BINARY mode data connection for MLSD.
Error: The data connection could not be established: ECONNREFUSED - Connection refused by server
I've tried using ftp_get_file with other sites, ones that FileZilla CAN access using the Explicit FTP setting, and ftp_get_file has no problems (well, there is a problem with whether or not path names are allowed, but that's another matter). So I looked for additional info on ftp_get_file (e.g. what mode(s) it uses) but couldn't find anything. Again, ftp_get_file seems to have access to the same set of sites FileZilla does when the latter's mode is set to Explicit FTP over TLS, but can't access a site that FileZilla can only access with the plain FTP setting (if that makes any sense).
Does anyone know or know where I can find info on what kind of modes ftp_get_file and ftp_get_nlist use by default and if they can be changed? Or am I completely off-base here?
Thanks in advance for any info.
Norman