Re: [PATCH] allow implicit ServerRoot via apxs

2003-11-10 Thread Mike Cramer
Geoffrey Young wrote: I've tested it against everything I have. mike, if you can give CVS a whirl today, that would be great. I finally had a chance to try this out this morning and it worked perfectly -- and when I forgot to feed it the path to apxs the first time I tried it, the error

Re: [PATCH] allow implicit ServerRoot via apxs

2003-11-10 Thread Geoffrey Young
Mike Cramer wrote: Geoffrey Young wrote: I've tested it against everything I have. mike, if you can give CVS a whirl today, that would be great. I finally had a chance to try this out this morning and it worked perfectly -- and when I forgot to feed it the path to apxs the first time I tried

Re: [PATCH] allow implicit ServerRoot via apxs

2003-11-07 Thread Geoffrey Young
this is in now. I've tested it against everything I have. mike, if you can give CVS a whirl today, that would be great. $ cvs -z9 :pserver:[EMAIL PROTECTED]:/home/cvspublic checkout mod_perl-2.0 or $ cvs -z9 :pserver:[EMAIL PROTECTED]:/home/cvspublic checkout httpd-test thanks. --Geoff

Re: [PATCH] allow implicit ServerRoot via apxs

2003-11-04 Thread Mike Cramer
Geoffrey Young wrote: +if ($base = $self-{inherit_config}-{ServerRoot}) { +debug using inherited ServerRoot $base to resolve $file; +} +elsif ($base = $self-apxs('PREFIX')) { +warning using apxs-derived ServerRoot $base to resolve $file; +} +

Re: [PATCH] allow implicit ServerRoot via apxs

2003-11-04 Thread Geoffrey Young
+elsif (file_name_is_absolute($file)) { Shouldn't the file_name_is_absolute case be first? indeed - I only noticed that case after I had coded the others. clearly not enough coffee yet :) --Geoff

Re: [PATCH] allow implicit ServerRoot via apxs

2003-11-04 Thread Stas Bekman
Geoffrey Young wrote: [...] +elsif ($base = $self-apxs('PREFIX')) { +warning using apxs-derived ServerRoot $base to resolve $file; May be better to say it all? warning since ServerRoot is not defined, . using apxs-derived PREFIX $base to resolve $file;

Re: [PATCH] allow implicit ServerRoot via apxs

2003-11-04 Thread Geoffrey Young
Stas Bekman wrote: Geoffrey Young wrote: [...] +elsif ($base = $self-apxs('PREFIX')) { +warning using apxs-derived ServerRoot $base to resolve $file; May be better to say it all? warning since ServerRoot is not defined, . using apxs-derived PREFIX

Re: [PATCH] allow implicit ServerRoot via apxs

2003-11-04 Thread Stas Bekman
Geoffrey Young wrote: Stas Bekman wrote: Geoffrey Young wrote: [...] +elsif ($base = $self-apxs('PREFIX')) { +warning using apxs-derived ServerRoot $base to resolve $file; May be better to say it all? warning since ServerRoot is not defined, . using

Re: [PATCH] allow implicit ServerRoot via apxs

2003-11-04 Thread Geoffrey Young
and it's an absolute_path. no sense checking that - rel2abs returns an absolute path by definition. what if it fails? the call to rel2abs? since it does no check of the underlying filesystem I doubt that's realistic. I'm definitely a fan of error checking where it makes sense, but I also

Re: [PATCH] allow implicit ServerRoot via apxs

2003-11-04 Thread Geoffrey Young
the call to rel2abs? since it does no check of the underlying filesystem I doubt that's realistic. you are right, I've confused with the opposite operation abs2rel, which may fail if the base doesn't fit. In any case it's a good idea to check that rel2abs gives you a path that exists, no?

Re: [PATCH] allow implicit ServerRoot via apxs

2003-11-03 Thread Geoffrey Young
But this is not a guesswork. If ServerRoot is not specified PREFIX should be the one, since this is what Apache is doing. ah, ok. I didn't see how ap_config.h was pulling in the apxs prefix. cool. So use that and verify that the files can be found. If not, complain that ServerRoot can't be

Re: [PATCH] allow implicit ServerRoot via apxs

2003-11-03 Thread Mike Cramer
Geoffrey Young wrote: one thing I noticed is that if ServerRoot is not specified in httpd.conf then Apache-Test can't resolve relative Include directives (such as conf/ssl.conf), so they need to be postponed until later in order to be picked up as they would if ServerRoot were specified. Your

Re: [PATCH] allow implicit ServerRoot via apxs

2003-11-02 Thread Mike Cramer
Mike, can you should us an example of what is picked wrong? Full paths will stay full paths, and relative paths will be rerouted to the new ServerRoot defined by Apache-Test. Is that where the failure coming from? So if you had: LoadModule foo modules/bar.so it won't be able to expand it to

Re: [PATCH] allow implicit ServerRoot via apxs

2003-11-01 Thread Geoffrey Young
The easiest way I've found to do this in Apache::Test is attached. It extracts the PREFIX from apxs and uses that as the default inherited ServerRoot value. If a value is hard-coded into the global httpd.conf, it supercedes the apxs value and everything works just like before. hmm. it looks

Re: [PATCH] allow implicit ServerRoot via apxs

2003-11-01 Thread Stas Bekman
Mike Cramer wrote: Currently, if your local httpd.conf doesn't contain a ServerRoot directive but has relative-paths to things like DSO modules, Apache::Test fails. Obviously, a ServerRoot is necessary for Apache to function properly, but the ServerRoot directive is only one of several ways to

Re: [PATCH] allow implicit ServerRoot via apxs

2003-11-01 Thread Stas Bekman
Geoffrey Young wrote: The easiest way I've found to do this in Apache::Test is attached. It extracts the PREFIX from apxs and uses that as the default inherited ServerRoot value. If a value is hard-coded into the global httpd.conf, it supercedes the apxs value and everything works just like

[PATCH] allow implicit ServerRoot via apxs

2003-10-31 Thread Mike Cramer
Currently, if your local httpd.conf doesn't contain a ServerRoot directive but has relative-paths to things like DSO modules, Apache::Test fails. Obviously, a ServerRoot is necessary for Apache to function properly, but the ServerRoot directive is only one of several ways to set it. Once nice