Hi have the below syntax:
$source = $csv_filename;
$target = '/locexport/'.$csv_filename;
$conn = ftp_connect("ftp.server.com") or die("Could not connect");
ftp_login($conn, "ftpusername", "ftppassword");
ftp_pasv($conn, false);
$upload = ftp_put($conn, $target, $source, FTP_ASCII);
if (!$upload) { echo 'FTP upload failed!'; }
This script runs with cron jobs every few hours and has worked for months.
it has suddenly stopped working.
echoing $source and $destination shows the correct paths.
error message is:
Warning: ftp_put() [function.ftp-put]: Opening ASCII mode data connection. in /home/shareduser/public_html/export/export.php on line 55
FTP upload failed!
line 55 is:
$upload = ftp_put($conn, $target, $source, FTP_ASCII);
I have tried changing FTP_ASCII to FTP_BINARY but with the same result.
any ides how to troubleshoot this? it is not a permission issue as a manual transfer in Filezilla with the same credentials succeeds.
Thanks and Regards.