variables in "include"
mike503 at gmail.com
Tue Jul 21 02:25:27 MSD 2009
On Mon, Jul 20, 2009 at 3:13 PM, Marcus Clyne<maccaday at gmail.com> wrote:
> That would be overall less efficient, since if you had htaccess-like files,
> you would always want to check the uppermost level (because it might say to
> ignore htaccess files lower down). If it did, then you will have checked
> lower-level htaccess files unnecessarily.
I'm not sure; I think it might be interesting to ask the PHP folks why
they decided to do it that way. if I'm protecting phpMyAdmin for
example, it will find my .htaccess file quicker one way vs. the other
depending on how nested it is.
> Wrt caching, any valid htaccess files would probably want to be cached
> permanently until any files were htaccess updated (i.e. not re-read after
> 15s of not reading as might be the case here). You'd only want to stat the
> file, then only if it's changed, re-load the config. The directive would
> then be less a cache time directive, but a 'don't stat the file to see if
> it's changed within this time' directive.
> Not sure if that's what you meant or not.
yeah. hmm. i didn't think that all the way though. caching the
existence (or lack of) for 15 seconds before it invalidates itself
wouldn't be useful. it wouldn't be very good. i don't know how
expensive a basic stat call is. of course, that's why htaccess on;
could be allowed in any location block, so you could limit the amount
of overhead if you wish.
> Obviously, you'd want to be statting/loading the file asynchronously, so as
> not to block the server whilst it was happening.
> You'd probably also want to specify which directives would be permissible -
> perhaps on a module-by-module basis - which would only be specifiable in the
> main config files.
of course. my main thing is for auth blocks.
php overrides can be handled with htscanner (pre 5.3) or php 5.3.
More information about the nginx