Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003764 [Quercus] minor always 11-16-09 12:07 02-01-24 21:38
Reporter dobes_vandermeer View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version
Summary 0003764: fread() on a regular file doesn't return all requested bytes?
Description I recently encountered an issue where calls to fread() on a regular file returned fewer bytes than requested. This causes issues in code which relies on the PHP core implementation's behavior where fread() and fwrite always write completely for regular files, despite the documentation saying that it may read or write fewer bytes.

I submitted an issue with WordPress http://core.trac.wordpress.org/ticket/11154 [^] about their false assumptions around fread() but I think it would make easier to run existing apps on Quercus if it showed the same behavior as the core PHP app rather than making everyone else fix their PHP code.
Additional Information
Attached Files  dasdas.webp [^] (165,378 bytes) 01-01-24 14:11
 lp5.jpg [^] (22,849 bytes) 02-01-24 21:38

- Relationships

- Notes
(0004608)
Chris Graham
05-23-10 06:10

The PHP manual is (at least now) quite specific about when full data won't be returned:
1) EOF (end of file) is reached
2) a packet becomes available (for network streams)
3) 8192 bytes have been read (after opening userspace stream)

None of these are your pedestrian scenarios of fread use, so I believe we have a bug in Quercus and not people's code. I think that's reasonable too, people shouldn't have to worry about issues like this for such a basic function.

I think it is the same as issues 0003894 and 0003765. I examined the Wordpress code referenced here and it was indeed loading large amounts of data, presumably over that 8kb bug-inducing threshold.

The good news is people worried about this bug only need to think of scenarios where they are reading more than 8kb.
 
(0004677)
dunand
07-20-10 10:47

This Behavior make Wordpress 3.0 in French unusable because Wordpress is unable to load the translation file fr_FR.mo. The fread funtion read only 8164 bytes but the file is much larger.
 
(0007220)
reebsmith32
07-27-23 04:47
edited on: 07-27-23 04:47

Make sure to check this out https://celebrityjackets.us/mission-impossible-7-hayley-atwell-jacket [^]

 
(0007227)
sorrowfullover
08-15-23 21:17

. I'm running resin with resin:resin user account and it's home directory was set to an obsolete Resin installation that no longer existed. https://blobopera.io/ [^]
 
(0007261)
Bueno45
09-22-23 08:22

https://ostoratv.app [^] also comes with the bug fixed.
 
(0007268)
orlandoolivia106
09-28-23 04:03

chechk this out https://www.aairtickets.com/espanol/flybondi-telefono/ [^]
 

- Issue History
Date Modified Username Field Change
11-16-09 12:07 dobes_vandermeer New Issue
05-22-10 04:19 Chris Graham Issue Monitored: Chris Graham
05-23-10 06:10 Chris Graham Note Added: 0004608
07-20-10 10:43 dunand Issue Monitored: dunand
07-20-10 10:47 dunand Note Added: 0004677
12-29-22 18:01 jendy henna Note Added: 0007137
12-29-22 18:02 jendy henna Note Edited: 0007137
12-29-22 18:02 jendy henna Note Edited: 0007137
07-27-23 04:47 reebsmith32 Note Added: 0007220
07-27-23 04:47 reebsmith32 Note Edited: 0007220
08-15-23 21:17 sorrowfullover Note Added: 0007227
09-22-23 08:22 Bueno45 Note Added: 0007261
09-28-23 04:03 orlandoolivia106 Note Added: 0007268
10-03-23 05:34 orlandoolivia106 Note Added: 0007271
11-14-23 17:05 ferg Note Deleted: 0007137
11-14-23 17:05 ferg Note Deleted: 0007271
01-01-24 14:11 dewon File Added: dasdas.webp
02-01-24 21:38 DeenaDubill9 File Added: lp5.jpg


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
61 total queries executed.
42 unique queries executed.
Powered by Mantis Bugtracker