Results 1 to 2 of 2
May 8, 2006, 06:13 #1
ftp_put error - Warning: ftp_put(): Opening ASCII...
I have a ftp-put procedue that is working fine on my devcelopment server but fails to work on the clients server.
This is what I have:
$ftp_remote_file = $fname_str;
$ftp_local_file = $fname_str;
$ftp_c = ftp_connect($ftp_host);
ftp_login($ftp_c, $username, $password);
ftp_put($ftp_c, $ftp_remote_file, $ftp_local_file, FTP_ASCII);
Warning: ftp_put(): Opening ASCII mode data connection for...
The FTP connection is working and a file is transfered with the correct file name but the file has 0k, in other words no data was transfered.
The PHP script resides in the same directory as the file being transfered.
May 9, 2006, 08:39 #2
I was able to work it out by activating the ftp_pasv() mode and it work like a charm.
// turn passive mode on