Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:17415 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8723 invoked by uid 1010); 26 Jul 2005 19:45:31 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 8708 invoked from network); 26 Jul 2005 19:45:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jul 2005 19:45:31 -0000 X-Host-Fingerprint: 64.233.184.206 wproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.184.206:51375] helo=wproxy.gmail.com) by pb1.pair.com (ecelerity 2.0 beta r(6227M)) with SMTP id EB/4B-58254-BD296E24 for ; Tue, 26 Jul 2005 15:45:31 -0400 Received: by wproxy.gmail.com with SMTP id i21so20894wra for ; Tue, 26 Jul 2005 12:45:28 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=s4XjlyOSmklqtBF0fNKORzv2GYjn9H/UIRDJGppegmRBWtcKEknHaEQc2JUv5qKH8MMvPGHzI4ToFhCrKTJu2IWt2mpPL7DRDZ03cY711TmbpM35i4oyvlis87lxDM2DvmGvFXgMQrKn5g3PCRHOZiL9Y3V61GhqZUHz8Nn9vGo= Received: by 10.54.67.8 with SMTP id p8mr43563wra; Tue, 26 Jul 2005 12:45:28 -0700 (PDT) Received: by 10.54.153.5 with HTTP; Tue, 26 Jul 2005 12:45:28 -0700 (PDT) Message-ID: <4e89b4260507261245773b792d@mail.gmail.com> Date: Tue, 26 Jul 2005 15:45:28 -0400 Reply-To: Wez Furlong To: Andi Gutmans Cc: Greg Beaver , internals@lists.php.net In-Reply-To: <5.1.0.14.2.20050725134019.02af2570@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <46.D7.33635.72170E24@pb1.pair.com> <5.1.0.14.2.20050725134019.02af2570@localhost> Subject: Re: [PHP-DEV] new bug in 5.1.0b3 with length param in fread() with local files From: kingwez@gmail.com (Wez Furlong) From the description, it doesn't sound like a bug. Awaiting more details. --Wez. On 7/25/05, Andi Gutmans wrote: > Has anyone had a chance to look at this problem? >=20 > At 10:08 PM 7/21/2005 -0600, Greg Beaver wrote: > >Hi, > > > >I have noticed that fread()'s behavior has changed between PHP 5.0.4 and > >PHP 5.1.0b3. Basically, http://pear.chiaraquartet.net/go-pear.phar work= s > >in PHP 5.0.4 and fails in 5.1.0b3 because of this change. The line in > >question of the .phar from PHP_Archive is: > > > > fread($this->_file, $this->internalFileLength + $this->footerLe= ngth); > > > >Basically, a .phar is a .tar. For files inside the .phar larger than > >16000 bytes, the fread above fails with the incorrect error message: > > > >PHP Warning: fread(): Length parameter must be greater than 0 in > >c:\php5\pear\PHP\Archive.php on line 193 > > > >Note that the failure is OS-independent. > > > >However, the actual length parameter is 21,155, which is not less than > >zero, unless you consider it to be a negative number in binary. After t= he > >fread in PHP 5.0.4, ftell() reveals that the pointer has advanced to > >22016, whereas in 5.1.0b3, it has only advanced to 16384. > > > >According to the notes in http://bugs.php.net/bug.php?id=3D30936 this sh= ould > >work with a local file, so should I re-open 30936, or is this a new bug? > > > >Greg > > > >-- > >PHP Internals - PHP Runtime Development Mailing List > >To unsubscribe, visit: http://www.php.net/unsub.php >=20 > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20 >