Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45950 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4167 invoked from network); 4 Nov 2009 11:12:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Nov 2009 11:12:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 83.243.58.134 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 83.243.58.134 mailout2.netbeat.de Linux 2.6 Received: from [83.243.58.134] ([83.243.58.134:35874] helo=mailout2.netbeat.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B1/DA-34118-3A161FA4 for ; Wed, 04 Nov 2009 06:12:37 -0500 Received: (qmail 18461 invoked by uid 89); 4 Nov 2009 11:14:04 -0000 Received: from unknown (HELO ?192.168.1.21?) (postmaster%schlueters.de@93.104.61.148) by mailout2.netbeat.de with ESMTPA; 4 Nov 2009 11:14:04 -0000 X-Originator: 9e51b244e0a38413ab6a9876e36ba9df To: d.romanini@cineca.it Cc: internals@lists.php.net In-Reply-To: <19.E8.34118.60741FA4@pb1.pair.com> References: <19.E8.34118.60741FA4@pb1.pair.com> Content-Type: text/plain; charset="UTF-8" Date: Wed, 04 Nov 2009 12:11:40 +0100 Message-ID: <1257333100.12817.84.camel@guybrush> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PHP Stream wrappers seek with whence SEEK_CUR doesn't work From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) 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'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. johannes