Re: RE: Replacing file access backend

From: Date: Thu, 01 May 2003 04:48:16 +0000
Subject: Re: RE: Replacing file access backend
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-145893@lists.php.net to get a copy of this message
OK.. I've spent the past week working my way through the PHP file wrapper code. And have found that include and require statements DO actually go through the wrapper code.. I have a physfs wrapper written and registered as physfs://. Now I just need to make PHP use my wrapper instead of the php_plain_files_wrapper... Now is there any reason as to why the structures for the php_plain_files are defined as static?? As the real easy way to do this would be to replace the default structure with pointers to my functions.. but it is defined as static.. so, most likely I'm going to have to create a patch to the PHP code for my own uses... Any other ideas on how I can accomplish this? > On Sat, 2003-04-26 at 17:33, Rasmus Lerdorf wrote: > But you said you wanted to intercept include and require calls as well.  > There is no hook for doing that.  We go directly to the filesystem. > On Sat, 26 Apr 2003 17:29:17 -0500, Edward Rudd wrote: > Well, I'm using the SAPI Embed module to embed the PHP "engine" in my > program similar to using python or TCL as a "scripting engine". > So I'm not wanting to override things in PHP, but in my C code at the > engine level.. I just need to find some better documentation/pointers as > to where to start. > > On Sat, 26 Apr 2003 15:14:23 -0700, Rasmus Lerdorf wrote: > >> On Sat, 26 Apr 2003, Edward Rudd wrote: >>> That's not quite what I'm wanting.. but it'll do to hack things >>> in for now, what I'm wanting is native code implementation of this >>> and be able to override ALL file access. Including include and require >>> statements.. >> >> Then you need to do it at your kernel level or somewhere below PHP. We do >> not wrap all file access as it would be way too slow. >> >> -Rasmus

« previous php.general (#145893) next »