#15013 closed defect (bug) (invalid)
[fix] Automatic plugin installer/updater fails to upload files over 64k (ftpext mode)
Reported by: | gasparch | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0.1 |
Component: | Upgrade/Install | Keywords: | |
Focuses: | Cc: |
Description
In case if plugin/theme has a file which is larger than 64k - it fails to copy that file over FTP, sometimes leaving temp files exactly 65536 bytes long. FTP server itself has no problems copying such files (tested manually).
It turns out that reading file in 8k chunks hits some bug in php randomly. So it works rarely, but msot of the time fails.
Smaller buffer size works without any problems.
So I've changed the
wp-admin/includes/class-wp-filesystem-ftpext.php , line 107
while ( ! feof($temp) )
$contents .= fread($temp, 8192);
to
while ( ! feof($temp) )
$contents .= fread($temp, 4096);
and it started to work every time I use automatic updater/installer.
CentOS 2.6.18-194.8.1.el5.028stab070.5 i686 athlon, Apache 2.0, PHP 5.2.14, latest version of WordPress (3.0.1), pureftp.
Change History (7)
#1
in reply to:
↑ description
@
14 years ago
#4
@
14 years ago
Seems like an utterly useless change to me.
That being said, PureFTP seems to have issues with a lot of things, While the change is useless, it also won't kill something.. So even for throwing it in there to be s safe s possible is an option.
#5
@
12 years ago
- Keywords close added
Unless dd32 jumps on this, suggesting close after 2 years of nada
#6
@
12 years ago
- Keywords 3.2-early removed
- Milestone Future Release deleted
- Resolution set to invalid
- Status changed from new to closed
2 years, no duplicate reports, a change that AFAIK is harmless & useless (other than making twice as many string operations).
I'm going with invalid for now unless another report comes in, or a bug is pointed to in PHP we need to work around.
If the original reporter can still duplicate it, or someone else runs into it, we can look at it again.
Replying to gasparch:
Any documentation on this or any reports upstream?