On Thu, 2 May 2002 20:10:15 +0200 F. Xavier Noria <[EMAIL PROTECTED]> wrote:
: I am having problems configuring Apache::AuthCookieDBI and am a bit : lost, since it seems there is something wrong with the secret key : file I cannot see, I attach below the configuration in case it can : help. I have checked the permissions of the file (the server runs : in by box as "fxn"): The problem, it seems, was that I was setting the variables used by the module _after_ loading it, as in the example of its manual page: PerlModule Apache::AuthCookieDBI PerlSetVar BuscaWAPPath / PerlSetVar BuscaWAPLoginScript "/cgi/login.pl" # These must be set PerlSetVar BuscaWAPDBI_DSN "dbi:Oracle:BW_CATALOG" PerlSetVar BuscaWAPDBI_SecretKeyFile "/home/fxn/prj/bw/buscawap/etc/auth.key" Apache::AuthCookieDBI reads its config variables in a BEGIN block. I inserted a trace there and keys %{ Apache->server->dir_config() }; returned no variable set via PerlSetVar after that PerlModule directive. So the hash %SECRET_KEYS, initialized there, had no entries. Moreover, when I tried to access a protected URL as localhost/docs I was redirected to /cgi/login.pl as configured (as you see, after PerlModule as well), which confused me. I suppose this is so because the module sees the variable at runtime, where the config file has been already fully read. Loading Apache::AuthCookieDBI after setting WhatEverDBI_SecretKeyFile has solved the problem. I am doing something wrong or the example in the manual page would need to be modified? -- fxn