On Tue 14 Oct 2008, Torsten Foertsch wrote: > On Tue 14 Oct 2008, André Warnier wrote: > > When I try this, I get an Apache error with the following logfile > > message : [Tue Oct 14 16:10:40 2008] [error] [client > > 84.158.163.207] $r->add_config() has failed: SetHandler not allowed > > here at /usr/local/lib/apache2/perllib/AUTH/StarLogCookie.pm line > > 414.\n > > That is an apache error. SetHandler needs the FileInfo override flag, > see http://httpd.apache.org/docs/2.2/mod/core.html#sethandler. So, > the correct command would be: > > $r->add_config(['SetHandler ...'], Apache2::Const::OR_FILEINFO) > > or simpler > > $r->add_config(['SetHandler ...'], ~0) > > (since you know what directive you are adding).
Maybe others are interested too, here are 2 private messages: On Wed 15 Oct 2008, André Warnier wrote: > Ok, I did, and it seems to work too : > > So I have 2 sequences that work : > a) > $r->add_config(['SetHandler modperl'], ~0); > $r->set_handlers(PerlAuthzHandler => []); # disable authorization > $r->set_handlers(PerlResponseHandler => \&_send_login_form); > #$r->set_handlers(PerlFixupHandler => sub { > $_[0]->handler('modperl') } ); > > b) > #$r->add_config(['SetHandler modperl'], ~0); > $r->set_handlers(PerlAuthzHandler => []); # disable authorization > $r->set_handlers(PerlResponseHandler => \&_send_login_form); > $r->set_handlers(PerlFixupHandler => sub { > $_[0]->handler('modperl') } ); > > Now, can you explain ? > I don't even understand what "~0" means.. On Wed 15 Oct 2008, Torsten Foertsch wrote: > On Wed 15 Oct 2008, André Warnier wrote: > > 1) you mentioned that it was due to a Apache bug. > > Did I really say bug? I meant an Apache error message. You'll see the > same message if you try something like that: > > <Directory /> > AllowOverride AuthConfig > </Directory> > > and then have an .htaccess with a SetHandler directive in it. > SetHandler needs "AllowOverride FileInfo". But only AuthConfig is > set. > > The 2nd parameter to add_config is a AllowOverride bit field. It > limits what kind of directives are allowed to be added. Think of it > as if you have read the directives from an untrusted source (like > .htaccess). > > > 2) I do not have a clue why the above would work around that bug. > > Apache wants here not only to be told to add the SetHandler but also > to be ensured "Yes, that is what I want. Just do it!". > > ~0 means all bits turned on. Torsten -- Need professional mod_perl support? Just hire me: [EMAIL PROTECTED]