Why can't I send my feed over ftp?
Posted by - NA - on 07 December 2010 11:36 AM
SolutionCheck the following things:

* Your php build has the ftp extensions built in
* The ftp functions are not disabled in php.ini under disable_functions
* Your ftp directory is correct. You can check this by logging into the ftp server manually and copying the remote directory.
* Your ftp filename or ftp server are incorrect. Neither of these should have any slashes in them. If you have slashes in your ftp filename or ftp server, then put the directory portion in the ftp directory field.
* Check with your host to see if there is any reason that a process spawned by the web server could not make an outbound ftp connection. This may include security measures in place on the webserver (software firewall, mod_security), or in place on the network (hardware firewall, IDS).
* Check with the server you're trying to connect to and see if they have any record of your connection or if there's any reason they're blocking it.

You can use the following unencrypted test code to troubleshoot FTP problems with Feed Manager 2.0:

$ftp_server = '';
$ftp_login = '';
$ftp_password = '';
$ftp_directory = '';
$filename = '';

$ftp = ftp_connect($ftp_server);
if (ftp_login($ftp, $ftp_login, $ftp_password)) {
ftp_pasv($ftp, TRUE);
if (ftp_chdir($ftp, $ftp_directory)) {
if (ftp_put($ftp, basename($filename), $filename, FTP_BINARY)) {
} else {
die("Cannot upload file to ftp server");
} else {
die("Cannot change directory to $ftp_directory");
} else {
die("Cannot login to ftp server");

Comments (0)
Post a new comment
Full Name: