Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58979 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90058 invoked from network); 16 Mar 2012 18:50:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Mar 2012 18:50:01 -0000 Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.22 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.22 smtp2.ist.utl.pt Linux 2.6 Received: from [193.136.128.22] ([193.136.128.22:59766] helo=smtp2.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 75/B5-43639-55B836F4 for ; Fri, 16 Mar 2012 13:49:58 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp2.ist.utl.pt (Postfix) with ESMTP id 8C3FA70003ED; Fri, 16 Mar 2012 18:49:54 +0000 (WET) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp2.ist.utl.pt ([127.0.0.1]) by localhost (smtp2.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id vZJRmsysCZ6O; Fri, 16 Mar 2012 18:49:54 +0000 (WET) Received: from mail2.ist.utl.pt (mail.ist.utl.pt [IPv6:2001:690:2100:1::8]) by smtp2.ist.utl.pt (Postfix) with ESMTP id 4946270003C3; Fri, 16 Mar 2012 18:49:54 +0000 (WET) Received: from damnation.mshome.net (damnation-air.nl.lo.geleia.net [IPv6:2001:470:94a2:4:7d06:1af1:ea64:2d52]) (Authenticated sender: ist155741) by mail2.ist.utl.pt (Postfix) with ESMTPSA id C4C8A20071C9; Fri, 16 Mar 2012 18:49:52 +0000 (WET) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Eric Stenson" , "internals@lists.php.net" References: <3ADF645454450443973DDB04FC00A0E525885F35@TK5EX14MBXC296.redmond.corp.microsoft.com> <3ADF645454450443973DDB04FC00A0E525887C88@TK5EX14MBXC296.redmond.corp.microsoft.com> Date: Fri, 16 Mar 2012 19:49:56 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Organization: =?utf-8?Q?N=C3=BAcleo_de_Eng=2E_Biom=C3=A9di?= =?utf-8?Q?ca_do_I=2ES=2ET=2E?= Message-ID: In-Reply-To: <3ADF645454450443973DDB04FC00A0E525887C88@TK5EX14MBXC296.redmond.corp.microsoft.com> User-Agent: Opera Mail/11.61 (Win32) Subject: Re: [PHP-DEV] Q: ZEND_HANDLE_STREAM and wincache extension on PHP 5.4 From: glopes@nebm.ist.utl.pt ("Gustavo Lopes") On Fri, 16 Mar 2012 16:52:39 +0100, Eric Stenson wrote: > > Thank you, Gustavo! Is Dmitry on the internals mailing list? It's best you send him an e-mail to dmitry@zend.com > 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? Conceptually, comparing zend_compile_file and zend_stream_function is already a little fuzzy because they don't do the same thing; zend_compile_file has already been provided a zend_file_handle. What may make them comparable is that the zend_file_handle may be just a file name and so effectively the file will have to be opened by the zend_compile_file implementation (see also zend_stream_fixup). > > Does the phar extension make any distinction between when streams are > opened? Or, is it by virtue of only handling files that only end with > extensions that aren't compiled that it's skipping the code in > php_cgi!main()? 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. 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. -- Gustavo Lopes