On Mon, 12 Feb 2001, Marc Lehmann wrote:
> On Mon, Feb 12, 2001 at 08:48:57AM +0800, Stas Bekman <[EMAIL PROTECTED]> wrote:
> > Looks like Apache doing stat() calls problem. Try to run the request under
> > strace(1) or truss(1). See:
> > http://perl.apache.org/guide/performance.html#Reducing_the_Number_of_stat_Ca
>
> this is with perl-status:
>
> [pid 14461] stat("/tmp/perl-status", 0xbffff3cc) = -1 ENOENT (No such file or
>directory)
> [pid 14461] stat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=3505, ...}) = 0
> [pid 14461] open("/.htaccess", O_RDONLY) = -1 ENOENT (No such file or directory)
> [pid 14461] open("/tmp/.htaccess", O_RDONLY) = -1 ENOENT (No such file or directory)
>
> and this is the same as with /test when there is no /tmp/test. With an
> existing /tmp/test, I get:
>
> [pid 14460] stat("/tmp/test", {st_mode=S_IFDIR|0755, st_size=35, ...}) = 0
> [pid 14460] open("/.htaccess", O_RDONLY) = -1 ENOENT (No such file or directory)
> [pid 14460] open("/tmp/.htaccess", O_RDONLY) = -1 ENOENT (No such file or directory)
> [pid 14460] open("/tmp/test/.htaccess", O_RDONLY) = -1 ENOENT (No such file or
>directory)
Seems OK to me. I cannot reproduce your problem on my setup. The only
difference I have is that I have 'Options None' so I don't get the
.htaccess lookup.
> > > $Location{'/admin'} = { ... };
> > > $Location{'^/admin'} = { ... };
> >
> > Again, what strace tells you?
>
> apache is stat()'ing the path as long as it can, i.e. until
> .../cgi-bin/printenv oder . (there is no /admin directory in my
> DocumentRoot).
>
> > You will see everything that Apache does
> > while looking at the output.
>
> I couldn't try with PerlTransHandler yet (since I seem to have left this
> out when compiling mod_perl), but my question is: does this also fix the
> problems I encounter? I am not concerned about speed here, but rather
> about correctness, namely that I need ^/admin which shouldn't match at all
> in a Location directive.
What happens if you don't use C<Perl> sections and just a normal Apache
config? Also it's possible that you mix-up name spaces, so Apache gets the
wrong location matched. You can see the docs about that in guide's config
chapter or in Apache manual. If that's the problem.
> Thanks a lot for your reply!
>
> --
> -----==- |
> ----==-- _ |
> ---==---(_)__ __ ____ __ Marc Lehmann +--
> --==---/ / _ \/ // /\ \/ / [EMAIL PROTECTED] |e|
> -=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE --+
> The choice of a GNU generation |
> |
>
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/