Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46490 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38880 invoked from network); 22 Dec 2009 15:10:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Dec 2009 15:10:20 -0000 Authentication-Results: pb1.pair.com header.from=boite.pour.spam@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=boite.pour.spam@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.78.27 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: boite.pour.spam@gmail.com X-Host-Fingerprint: 74.125.78.27 ey-out-2122.google.com Received: from [74.125.78.27] ([74.125.78.27:19645] helo=ey-out-2122.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DA/A7-28791-A51E03B4 for ; Tue, 22 Dec 2009 10:10:20 -0500 Received: by ey-out-2122.google.com with SMTP id 9so283518eyd.39 for ; Tue, 22 Dec 2009 07:10:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=Tz1ejhx5RT2FUpTWu+GrZI888nCJoSHIzhwCzwh3r8E=; b=bnDvS58GnpRO2Q3kjvCp6xa35WZUhoSQDcPitEUqwZ8/erCIYPNXW05HQj/S8yCdeU 3ZoOoUmExjx1S6/GIdxtJoYeAA7mczAkoBm1+k8Ph3vpVte0otE81veo1skYBu71oTud Rwzzz1lKb2zHlu4JOoacclse+q9yLo4JK2rrI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=NfrWxrH8egi5BGm5qawDcpcXAFsCg4ptVFrgkytncoKJVkUOpjD1e73UKshNJtWUld /APUHT8KnpRLPhGIveHZEu64ev0Z+yKJxfMeA/ZyteKRfLwV0k+Cov2po5Fs7jivZx3H if/eQUbRrIZKqi1qUAWp5gUjo2W94tqVAs+Yo= MIME-Version: 1.0 Received: by 10.213.25.79 with SMTP id y15mr10570406ebb.78.1261494615453; Tue, 22 Dec 2009 07:10:15 -0800 (PST) Date: Tue, 22 Dec 2009 16:10:15 +0100 Message-ID: <5e33430b0912220710r6effa11eq56e296e73041e8f1@mail.gmail.com> To: internals@lists.php.net Content-Type: multipart/mixed; boundary=000e0ce0b72670afa6047b529aeb Subject: [PATCH] Fix for 32 bits limit on file size (see bug 48886) From: boite.pour.spam@gmail.com (X Ryl) --000e0ce0b72670afa6047b529aeb Content-Type: multipart/alternative; boundary=000e0ce0b72670af98047b529ae9 --000e0ce0b72670af98047b529ae9 Content-Type: text/plain; charset=ISO-8859-1 Hi, I'm not a C developer, so I can't really help with the attached patch. However, I've tried it with PHP 5.3.0 version I have and it does what it claims, that is, it gives correct behaviour for the following functions: filesize, fstat, stat when used on file > 4GB on a 32 bits machine. Currently, php 5.x doesn't give the correct output for this code (on my 32bits server): echo filesize("path/to/4.3GBfile"); // expecting 4617089843, got 322122547 With the patch applied, the good result is returned. From the patch author, it improves the tests results. From what I've understood, the patch switch to php's double type when the size overflow the 32bits limit of int. It doesn't seem to break any existing behaviour (I'm using this on my multiple project since july, and no bad experience so far). The explaination by the patch author: http://bugs.php.net/bug.php?id=48886 --000e0ce0b72670af98047b529ae9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

=A0I'm not a C developer, so I can't really help with t= he attached patch. However, I've tried it with PHP 5.3.0 version I have= and it does what it claims, that is, it gives correct behaviour for the fo= llowing functions:
filesize, fstat, stat when used on file > 4GB on a 32 bits machine.
C= urrently, php 5.x doesn't give the correct output for this code (on my = 32bits server):
echo filesize("path/to/4.3GBfile");=A0 // expe= cting 4617089843, got 322122547

With the patch applied, the good result is returned.
From the patch = author, it improves the tests results.
From what I've understood, th= e patch switch to php's double type when the size overflow the 32bits l= imit of int.
It doesn't seem to break any existing behaviour (I'm using this on = my multiple project since july, and no bad experience so far).

The e= xplaination by the patch author: http://bugs.php.net/bug.php?id=3D48886


=A0


--000e0ce0b72670af98047b529ae9-- --000e0ce0b72670afa6047b529aeb--