#20446 [Opn->Bgs]: negative filesize() returned on large files > 2Gb
| From: | derick@php.net | Date: | Fri, 15 Nov 2002 15:26:18 +0000 |
| Subject: | #20446 [Opn->Bgs]: negative filesize() returned on large files > 2Gb | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-24985@lists.php.net to get a copy of this message | ||
ID: 20446
Updated by: derick@php.net
Reported By: andrew.robinson@gni.co.uk
-Status: Open
+Status: Bogus
Bug Type: *Directory/Filesystem functions
Operating System: NT4 - SP 6
PHP Version: 4.2.3
New Comment:
This is not really a bug, PHP simply doesn't support unsigned integers,
and a signed integer on Windows/i386 only goes to 2^31 - 1 (about
2GB).
Ddderick
Previous Comments:
------------------------------------------------------------------------
[2002-11-15 09:23:22] andrew.robinson@gni.co.uk
the following works fine on small files (<2Gb) but returns negative
numbers for files larger.
while ( $file = readdir($dp) ){
clearstatcache();
if (! ereg("^[.]+$|^$",$file) ){
$stats = stat("$DIRNAME$file");
echo "$DIRNAME$file\t" . $stats[7] . "\t" filesize("$DIRNAME$file")
.
"\n";
}
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20446&edit=1