Hi guys,
I've just moved our site to a new server, and after doing so I am having problems getting ftp_put() to work. We use it to upload pictures, but when I try to, it gives me the following error:
Warning: ftp_put() [function.ftp-put]: Rename/move failure: No such file or directory in /home/intimate/public_html/include/functions.php on line 271
It worked with our previous hosting company, so I'm not sure what is different. I've verified that ftp login works, so the connection itself is alright.
Here is the function, making problems:
function upload_file($source_file, $destination_file) {
if ($conn_id = ftplogin()) {
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
if (!$upload) {
return "Det lykkedes ikke at uploade $source_file til $destination_file";
}
ftp_close($conn_id);
} else {
return "Det var ikke muligt at forbinde vha. FTP";
}
return false;
}
Line 271 is the following line:
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
Any help is really appreciated. Thank you 🙂