#44215 [Opn->Bgs]: filesize() returns wrong values for files >4gb

From: Date: Sat, 23 Feb 2008 19:56:47 +0000
Subject: #44215 [Opn->Bgs]: filesize() returns wrong values for files >4gb
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-122609@lists.php.net to get a copy of this message
ID: 44215 Updated by: jani@php.net Reported By: php at hack-mich dot net -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: Win Vista x64 PHP Version: 5.2.5 New Comment: There's already FR for this in bug #34750 no need for another report. Previous Comments: ------------------------------------------------------------------------ [2008-02-22 15:19:52] php at hack-mich dot net Description: ------------ For files >4gb filesize returns negative values (seems that it overwrites the sign bit -> becomes negative) Same is with 2gb files and 32bit oses, but that has not been confirmed yet. Reproduce code: --------------- echo filesize('foo.bar'); //if foo.bar is > 4gb it returns a negative value Expected result: ---------------- something like 5234556 Actual result: -------------- something like -3456634 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44215&edit=1

« previous php.bugs (#122609) next »