I have pretty strange problem. A web application moved from one server to another one. Since then the FTP upload is not working anymore.
$ftp = ftp_connect('ftphost');
if ($ftp == false) {
error_log('FTP Connect not possible');
}
$fp = fopen($filename, 'r');
if ($fp == false) {
error_log('Opening file not possible');
}
$login = ftp_login($ftp, 'username', 'password');
if ($login == false) {
error_log('FTP login not possible');
}
$status = ftp_fput($ftp, basename($filename), $fp, FTP_BINARY);
if ($status == false) {
error_log('FTP file upload not possible');
}
The error message is 'FTP file upload not possible'. I checked everything I know of. Selinux is disabled. When I do a FTP upload by hand (on the console with the tool "ftp") it works. The file names are randomly generated and always look like this: erefsdgftef.xml (No spaces.)
This code is part of the last order step within Magento and will therefore always be initiated through the apache httpd.
I don't get more error messages than the one posted before.
Something with the server configuration must be different on the new server. Does someone have more ideas?