Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45951 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54398 invoked from network); 4 Nov 2009 15:01:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Nov 2009 15:01:07 -0000 X-Host-Fingerprint: 130.186.18.181 pdl-18-181.nat.cineca.it Date: Wed, 04 Nov 2009 10:01:04 -0500 Received: from [130.186.18.181] ([130.186.18.181:22373] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/65-34118-C2791FA4 for ; Wed, 04 Nov 2009 10:01:04 -0500 Message-ID: To: internals@lists.php.net References: <19.E8.34118.60741FA4@pb1.pair.com> <1257333100.12817.84.camel@guybrush> User-Agent: Pan/0.133 (House of Butterflies) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Posted-By: 130.186.18.181 Subject: Re: [PHP-DEV] PHP Stream wrappers seek with whence SEEK_CUR doesn't work From: d.romanini@cineca.it (Davide Romanini) Il Wed, 04 Nov 2009 12:11:40 +0100, Johannes Schlüter ha scritto: > Hi, > > On Wed, 2009-11-04 at 10:18 +0100, Davide Romanini wrote: >> My php version: >> PHP 5.2.8 (cli) (built: Dec 17 2008 00:54:27) > > Please use a recent version of PHP. > >> Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) >> 1998-2008 Zend Technologies >> with Zend Extension Manager v1.0.11, Copyright (c) 2003-2006, by >> Zend Technologies >> with Zend Optimizer v3.2.0, Copyright (c) 1998-2006, by Zend >> Technologies >> with Zend Debugger v5.2.2, Copyright (c) 1999-2006, by Zend >> Technologies > > Please disable third party modules before reporting any issues to us. > I'll take time to try the script on php 5.2.11. I tried also on php 5.2.6 without zend extensions without success. If someone on the list could try it on a php 5.2.11 sandbox it is very welcome :-) >> I've attached a simple script to reproduce the bug. It's a modified >> version of the example stream wrapper at >> http://www.php.net/manual/en/stream.streamwrapper.example-1.php. > [...] >> It seems that the SEEK_CUR parameter is always ignored and the whence >> value passed to my wrapper is SEEK_SET. > > I think (didn't verify) that PHP keeps track of the position and > rewrites CUR to SET accordingly, but as said: Didn't verify. > Well, and why the hell php should do that?? It is a bug to me. Regards, Davide Romanini