Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36008 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57140 invoked from network); 6 Mar 2008 17:29:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Mar 2008 17:29:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:25642] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D0/33-38880-90A20D74 for ; Thu, 06 Mar 2008 12:29:47 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Thu, 6 Mar 2008 19:29:55 +0200 Message-ID: <06B0D32C7A96544490D18AF653D6BDE5026187EC@il-ex1.zend.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: cvs: ZendEngine2(PHP_5_3) / zend.c zend.h zend_vm_def.h zend_vm_execute.h php-src NEWS php-src/main fopen_wrappers.c fopen_wrappers.h main.c Thread-Index: Ach+/yrKYCRtFxsaT1CpER5mPlK2NAAr/9fA To: "Gregory Beaver" , "Dmitry Stogov" , "internals Mailing List" Subject: RE: cvs: ZendEngine2(PHP_5_3) / zend.c zend.h zend_vm_def.h zend_vm_execute.h php-src NEWS php-src/main fopen_wrappers.c fopen_wrappers.h main.c From: dmitry@zend.com ("Dmitry Stogov") Hi Gregory, It's good idea. I missed this feature when I tried to transparently include file from tar archive. Probably we must do it. Please try to make a patch if you have time (I'm busy now) Thanks. Dmitry. > -----Original Message----- > From: Gregory Beaver [mailto:greg@chiaraquartet.net]=20 > Sent: Wednesday, March 05, 2008 11:25 PM > To: Dmitry Stogov; internals Mailing List > Subject: Re: cvs: ZendEngine2(PHP_5_3) / zend.c zend.h=20 > zend_vm_def.h zend_vm_execute.h php-src NEWS php-src/main=20 > fopen_wrappers.c fopen_wrappers.h main.c >=20 >=20 > Dmitry Stogov wrote: > > dmitry Wed Mar 5 13:34:16 2008 UTC > >=20 > > Modified files: (Branch: PHP_5_3) > > /php-src NEWS=20 > > /php-src/main fopen_wrappers.c fopen_wrappers.h main.c=20 > > /ZendEngine2 zend.c zend.h zend_vm_def.h zend_vm_execute.h=20 > > Log: > > Optimized require_once() and include_once() by=20 > eliminationg open()=20 > > syscall on second usage. >=20 > Hi Dmitry, >=20 > This is a very nice addition - I wonder if you might be=20 > interested in a patch to enable stream wrappers in=20 > include_path? There are a couple of ways this could be done,=20 > but the one I think would be best is checking for "//"=20 > immediately following ":" and then attempting to locate a=20 > stream wrapper, and if not found then shunt to the current=20 > realpath/fopen behavior. >=20 > I'm already implementing this kind of thing already inside=20 > pecl/phar, it would be trivial to provide a patch and a few tests. >=20 > The only question is whether this would be better resolved by=20 > simply intercepting zend_resolve_path inside pecl/phar,=20 > because include_path scanning may be significantly slower if=20 > we have to check for all possible stream wrappers and the=20 > requisite security checks for url-based wrappers. Checking=20 > for phar is very efficient as I've currently implemented it=20 > (have not yet committed, there are a few tests to be=20 > written/details to perfect), and doesn't open the door for=20 > shoot-yourself-in-the-foot security issues since all phar=20 > archives must be local on-disk. >=20 > Thanks, > Greg >=20