Re: open/close calls of include_once/require_once files.

From: Date: Thu, 12 Nov 2009 21:49:38 +0000
Subject: Re: open/close calls of include_once/require_once files.
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-46036@lists.php.net to get a copy of this message
On Thu, Nov 12, 2009 at 11:54:55AM -0800, Rasmus Lerdorf wrote: > A couple of notes. > > You make it sound like this happens on all includes. It is only > include_once/require_once that have this problem. Regular > include/require do not. Sorry for making it confusing. I meant only for include_once/require_once files. > This has been addressed in APC by overriding the opcode and providing > our own opcode handler for this case. See > > http://svn.php.net/viewvc/pecl/apc/trunk/apc_zend.c?view=markup&pathrev=289331 > line 86. Thanks for the link. > Having said that, it would be preferable, of course, if we didn't need > to swap out that code in APC but I am not sure your solution for solving > this only for absolute path includes is the right way to go here. I don't think it is possible to avoid calling zend_stream_open for files other than absolute paths in PHP. Rationale : Opcode cacher doesn't need to override the op if php engine can perform the check with ease. Cacher can however override it if included file is not in file-system. Regards, Basant.

« previous php.internals (#46036) next »