ID: 47025 Updated by: fel...@php.net Reported By: bfanger at gmail dot com -Status: Open +Status: Bogus Bug Type: Filesystem function related Operating System: Mac OS X 10.5.6 PHP Version: 5.2.8 New Comment:
It's expected, PHP doesnt works with large files yet. This is an item in our TODO, thanks. Previous Comments: ------------------------------------------------------------------------ [2009-01-07 11:35:23] bfanger at gmail dot com Description: ------------ I tried to create a directory listing including the filesize. But the directory containing a 4.4GB file shows an incorrect filesize of 400MB DirectoryIterator::getSize and filesize() have the same (32bit signed int) problem. Possible solutions: 1. Use a string (or other datatype) that can contain the filesize. (Bug #44215) 2. An extra optional parameter: filesize(string $filename, [bool human_readable = false]) Reproduce code: --------------- Using (not-existing) solution 2 $file = "/path/to/4.4GiB.file"; echo filesize($file, true); Expected result: ---------------- 4.4G Actual result: -------------- 401524051 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47025&edit=1