Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58982 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80071 invoked from network); 17 Mar 2012 09:08:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Mar 2012 09:08:18 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:34426] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BE/D6-43639-184546F4 for ; Sat, 17 Mar 2012 04:08:17 -0500 Received: by yenl5 with SMTP id l5so5503270yen.29 for ; Sat, 17 Mar 2012 02:08:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=lR6wZwkjVDuSYey9v6O2eqyZwCpwnSpjj42tooR2OEI=; b=S54TmUL8xtNhseQ5P+yqg/se3pBOIFMIRAbILdQgnoAsDP1ROgtqVW5f2vHhoXUGKG Lke0chL+OX4Htevdoi14vz/MsavXEUD+V1BfrZDmXfhVDpl67KvPc+CQajJYgW/TW+Sd 6YIazDo2HNtTQ4Z8pHDNzjKv8EigxBzUpBaNM2VtKsFnmIWiRBMH7e9z3JV0Tc3jT7Ig Bzbw0zD5g2lEYfxfvcoclkrgGtZIHqsg6SoNS5DYY/At3Yliix4zc+G+FAJKZT6HMWRe 2S6SoXLa8JHcwx1bjS7wtmFV8W6SZz3uEyo/SVuVC6pcux8onTH2ZHMuPnSe3Si2y/26 t2cg== MIME-Version: 1.0 Received: by 10.236.109.66 with SMTP id r42mr5665466yhg.39.1331975294891; Sat, 17 Mar 2012 02:08:14 -0700 (PDT) Received: by 10.146.169.9 with HTTP; Sat, 17 Mar 2012 02:08:14 -0700 (PDT) In-Reply-To: References: <3ADF645454450443973DDB04FC00A0E525885F35@TK5EX14MBXC296.redmond.corp.microsoft.com> <3ADF645454450443973DDB04FC00A0E525887C88@TK5EX14MBXC296.redmond.corp.microsoft.com> Date: Sat, 17 Mar 2012 10:08:14 +0100 Message-ID: To: Gustavo Lopes Cc: Eric Stenson , "internals@lists.php.net" , Dmitry Stogov Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Q: ZEND_HANDLE_STREAM and wincache extension on PHP 5.4 From: pierre.php@gmail.com (Pierre Joye) hi, On Fri, Mar 16, 2012 at 7:49 PM, Gustavo Lopes wrote: > It's best you send him an e-mail to dmitry@zend.com No, it is best to send a mail to internals and cc him. >> I was talking with Pierre yesterday, and there was some question about >> whether there was some distinction between streams that were created as a >> result of zend_compile_file versus just those files that were called by >> calling >> zend_stream_open_function. > > > What would this distinction be and what would be the implication? See the wincache code please. This comment was only about the wincache implementation. Also it is only about knowing whether we are in RINIT or at runtime, as in, compile file being called from the SAPI or from require/include&co. > I think the reason phar causes no problem is because CGI will not be opening > phar:// files as a first script, which is all php_cgi!main() deals with. So > phar's zend_stream_function will in this case end up falling back on the > default implementation and cause no problem. Yes, see my reply earlier. > In any case, it's true that default implementation of > zend_stream_open_function (php_stream_open_for_zend_ex) does store a > php_stream* in handle. However, this clearly isn't the general case (even it > were, breaking the abstraction would already be dubious). This is definitely > a bug. It is not necessary a bug but a breakage in the ABI, and not documented. I discussed it with Dmitry and it was not seen as a bug but as an optimization. The problem in wincache is somehow special due the file caching mechanism, which mix up both SAPI file open and runtime file open, which ends in the current issue. Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org