Welcome! Log In Create A New Profile

Advanced

Re: variables in "include"

Marcus Clyne
July 20, 2009 06:13PM
Michael Shadle wrote:
> i agree. i think there should be an htaccess on; type deal, and instead of going
>
> /
> /home
> /home/foo
> /home/foo/bar
> /home/foo/bar/foo.com
>
> in the search path, it should start in the document root. in php 5.3,
> they actually take the file path being requested, and then go
> backwards from there, down to the document root level.
>
> so
>
> http://foo.com/1/2/3/
>
> would chekc for
>
> /home/foo/bar/foo.com/1/2/3/
> /home/foo/bar/foo.com/1/2/
> /home/foo/bar/foo.com/1/
> /home/foo/bar/foo.com/
>
>
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.
> maybe also have a cache and a configuration item of how much memory to
> dedicate to the cache...
>
> htaccess on;
> htaccess_file_name .htaccess;
> htaccess_cache_size shared:htaccess:10m;
> htaccess_cache_time 15s;
>
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.

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.

Cheers,

Marcus.
Subject Author Posted

variables in "include"

Kaspars Dambis July 20, 2009 06:40AM

Re: variables in "include"

Marcus Clyne July 20, 2009 08:56AM

Re: variables in "include"

Kaspars July 20, 2009 03:24PM

Re: variables in "include"

Marcus Clyne July 20, 2009 03:54PM

Re: variables in "include"

mike July 20, 2009 04:52PM

Re: variables in "include"

Kaspars July 20, 2009 05:25PM

Re: variables in "include"

mike July 20, 2009 05:52PM

Re: variables in "include"

Kaspars July 20, 2009 06:22PM

Re: variables in "include"

mike July 20, 2009 06:29PM

Re: variables in "include"

Kaspars July 20, 2009 06:48PM

Re: variables in "include"

Kaspars July 20, 2009 06:54PM

Re: variables in "include"

mike July 20, 2009 07:01PM

Re: variables in "include"

Marcus Clyne July 20, 2009 06:13PM

Re: variables in "include"

mike July 20, 2009 06:25PM

Re: variables in "include"

mike July 20, 2009 08:01PM

Re: variables in "include"

Marcus Clyne July 20, 2009 09:10PM

Re: variables in "include"

Marcus Clyne July 20, 2009 07:52PM

Re: variables in "include"

Kaspars July 20, 2009 06:45PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 68
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready