Bug #177
Usage statistics incorrect when filesize over 2GB
| Status: | Closed | Start: | 04/09/2009 | |
| Priority: | Normal | Due date: | ||
| Assigned to: | Andreas Unterkircher | % Done: | 100% |
|
| Category: | internals | Spent time: | 0.50 hours | |
| Target version: | 1.6 | |||
Description
stat() and filesize()
$size = stat('/var/lib/nephthys/transfer/c6f3da8f60f5e03119a576281ae1/XPRV5R5-FR5_DVD1.iso');
print \$size[7];
returns on a ~3GB file
-465534976
http://de.php.net/manual/en/function.filesize.php says
Note: Because PHP's integer type is signed and many platforms use 32bit integers, filesize() may return unexpected results for files which are larger than 2GB. For files between 2GB and 4GB in size this can usually be overcome by using sprintf("%u", filesize($file)).
Associated revisions
Revision 0f1395216391bb04b47052ad6430cfd741516a1d
fix PHP filesize() 32bit problems, fixes #177
History
Updated by Andreas Unterkircher 248 days ago
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
Applied in changeset 0f1395216391bb04b47052ad6430cfd741516a1d.
Updated by Andreas Unterkircher 248 days ago
- Status changed from Resolved to Closed
- Target version set to 1.6