Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40400 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21328 invoked from network); 9 Sep 2008 12:39:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Sep 2008 12:39:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=indeyets@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=indeyets@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 64.233.170.188 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: indeyets@gmail.com X-Host-Fingerprint: 64.233.170.188 rn-out-0910.google.com Received: from [64.233.170.188] ([64.233.170.188:44929] helo=rn-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CC/85-23799-C6E66C84 for ; Tue, 09 Sep 2008 08:39:08 -0400 Received: by rn-out-0910.google.com with SMTP id k40so523536rnd.0 for ; Tue, 09 Sep 2008 05:39:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=SfN8RVtuEur//3wqgdQeg/IeACqStVSgExjy5iXyeN8=; b=Ho8h3X8fCQ3ipszQbf+Kd6MP+vrGTmAslqCnfhqWebz+FSPM/zfdAOJK4J4A6Taar8 0EvL2XLNjQttTHzrh6oMzHasizvGhPP/aI/gSY72b94BU+KpfFsXSe/BT0vYPKQiH1cb 1Wx4m8XRnMAiUNnSsXKCTXQmq5OKYEIyIV1+o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=Ttp5gmPmLqAJgOLb75w92tS29QPwgW6UXs3QKIFNpx5g10PrxwX8GLSiyZ/9pnPM9c OSEENlhEXLjkhDLuKmDNX12aBXDJD8fWxo+2MkF7B2Ts3H4RPQcP41Fto80EXeXcRmnI bNRUrvMoiDRSoFZ17ZcLs9CVF/rRd8E93xDXY= Received: by 10.100.152.11 with SMTP id z11mr17105047and.157.1220963945399; Tue, 09 Sep 2008 05:39:05 -0700 (PDT) Received: by 10.100.91.3 with HTTP; Tue, 9 Sep 2008 05:39:05 -0700 (PDT) Message-ID: Date: Tue, 9 Sep 2008 16:39:05 +0400 To: "internals Mailing List" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Opinion needed (bug #45928) From: indeyets@gmail.com ("Alexey Zakhlestin") http://bugs.php.net/bug.php?id=45928 Christian Schneider wrote: > I had a quick look at this bug and found the problem to be in > Zend/zend_stream.c function zend_stream_fsize(): It uses fstat() to > determine the filesize which on MacOS X for pipes returns either 0 (my > interpretation: no data from the pipe ready yet) or a number up to 16384 > (my interpretation: data from the pipe ready but the maximum buffer size > is 16k). > > I see several solutions but I'm not sure which is the desired one: > - return 0 (size unknown) if the file is a pipe (or socket, ...) > - return 0 if the file is not a regular file (or symlink, dir?) > - look into a way of determining EOF reached > > As a quick test I changed > return buf.st_size; > in function zend_stream_fsize() to > return 0; > and cat 30k.php | php worked after that. > > I posted this to internals@php.net but did not get any reply so I'm not > sure how to proceed. -- Alexey Zakhlestin http://blog.milkfarmsoft.com/