FTP upgrading broken for me
-
Hi guys,
I’m wondering if anyone else has had this problem. Automatic updating of plugins isn’t working one of my servers – I’m not entirely sure when the problem started. We’re using FTP updating, and the offending part of the code is this (wp-admin/includes/wp-filesystem-ftpext.php):
function exists($file) { $list = @ftp_rawlist($this->link, $file, false); return !empty($list); //empty list = no file, so invert. }
By inserting a
print_r()
in there, I’ve been able to ascertain that the reason it’s failing is because my server isn’t returning an empty array – it’s returning an array with the line (eg if I tamper with the paths so it intentionally fails):ftpd: /usr/local/www/fwaggle.org/blog/wp-content: No such file or directory
Because
$list
contains an error, it’s not empty, so it’s returning “yes the file exists”. This is throwing off the upgrade script, which is returning a confusing error “directory exists” when if you check via FTP or shell, it clearly doesn’t.I’ve managed to work around this in my own, ugly way, but I was just wondering if anyone else has experienced this and knows why behaves in this manner? I’m assuming it’s a property of my ftp daemon (stock FreeBSD daemon) but perhaps this behavior should be coded around anyway.
Thanks for your time, and I look forward to hearing what others think about it.
Update: Rather than hacking the scripts for every wordpress on my server, I’ve just temporarily installed ProFTPd instead. Still though, it’d be nice if this were able to be fixed. ??
- The topic ‘FTP upgrading broken for me’ is closed to new replies.