Hi,
I am getting the following warning message when trying to use ftp_put():
Warning: ftp_put(): Transfer OK
This is causing the function to return false, when in fact the file is transferred successfully.
I have Googled this warning message but no one else has ever received it. Where is this warning coming from? Could it be from the FTP Server?
The section of code causing this is:
if ($conn_id = ftp_connect($ftp_server)) {
$log_msg .= "Connected to $ftp_server successfully.\\r\
";
} else {
$log_msg .= "Failed to connect to $ftp_server.\\r\
";
}
if (ftp_login($conn_id, $ftp_user, $ftp_pass)) {
$log_msg .= "Authentication with $ftp_server was successful.\\r\
";
} else {
$log_msg .= "Authentication with $ftp_server failed.\\r\
";
}
$log_msg .= "\\r\
Upload Output file:\\r\
";
if (ftp_put($conn_id, $dst_output_dir."/".$output_file, $src_output_dir."\\\\".$output_file, FTP_BINARY)) {
$log_msg .= "GOOD: " . $output_file . ".\\r\
";
} else {
$log_msg .= "BAD: " . $output_file . ".\\r\
";
}
This code used to work ok until I recently moved to uploading to another server, which has FileZilla FTP Server on it. I’m starting to this it is a configuration problem with the ftp server.
Thanks for viewing!
Alex