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:[EMAIL PROTECTED] 
> 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 
> zend_vm_def.h zend_vm_execute.h php-src NEWS php-src/main 
> fopen_wrappers.c fopen_wrappers.h main.c
> 
> 
> Dmitry Stogov wrote:
> > dmitry              Wed Mar  5 13:34:16 2008 UTC
> > 
> >   Modified files:              (Branch: PHP_5_3)
> >     /php-src        NEWS 
> >     /php-src/main   fopen_wrappers.c fopen_wrappers.h main.c 
> >     /ZendEngine2    zend.c zend.h zend_vm_def.h zend_vm_execute.h 
> >   Log:
> >   Optimized require_once() and include_once() by 
> eliminationg open() 
> > syscall on second usage.
> 
> Hi Dmitry,
> 
> This is a very nice addition - I wonder if you might be 
> interested in a patch to enable stream wrappers in 
> include_path?  There are a couple of ways this could be done, 
> but the one I think would be best is checking for "//" 
> immediately following ":" and then attempting to locate a 
> stream wrapper, and if not found then shunt to the current 
> realpath/fopen behavior.
> 
> I'm already implementing this kind of thing already inside 
> pecl/phar, it would be trivial to provide a patch and a few tests.
> 
> The only question is whether this would be better resolved by 
> simply intercepting zend_resolve_path inside pecl/phar, 
> because include_path scanning may be significantly slower if 
> we have to check for all possible stream wrappers and the 
> requisite security checks for url-based wrappers.  Checking 
> for phar is very efficient as I've currently implemented it 
> (have not yet committed, there are a few tests to be 
> written/details to perfect), and doesn't open the door for 
> shoot-yourself-in-the-foot security issues since all phar 
> archives must be local on-disk.
> 
> Thanks,
> Greg
> 

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to