6120
April 24, 2020, 12:20pm
1
Is there a cake method to send an xml file to ftp server ?
I am trying :
$ftp_conn = ftp_connect($ftp_server) or die();
$login = ftp_login($ftp_conn, ‘login_name’, ‘pwd’);
ftp_put($ftp_conn, $filename . ‘.xml’, $myFile, FTP_ASCII);
ftp_close($ftp_conn);
But it does not work. Error :
ftp_put(): bind() failed: Permission denied (13)
Zuluru
April 24, 2020, 3:59pm
2
You never check the return value of ftp_login
. From the “permission denied” error, I’m guessing that the login is failing.
6120
April 24, 2020, 4:58pm
3
Thank you for this answer.
In fact, I was not told that the server was in passive mode.
I called the maintenance department and I added
ftp_pasv($conn_id, true);
Thank you again.