Newbie question about AuthCookieDBI
Hi all, I am a newbie user of mod_perl trying to work with Apache::AuthCookieDBI and have been running into several obstacles. I'm hoping someone can point me in the right direction. I just installed Apache::AuthCookie successfully and was able to get it to work with the necessary changes in my httpd.conf file. Now I want to use Apache::AuthCookieDBI to authenticate against a database table. However during my installation, while doing the 'make test' I get the following error message --- Can't locate object method "module" via package "Apache" at /usr/local/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 202. Compilation failed in require at blib/lib/Apache/AuthCookieDBI.pm line 41. BEGIN failed--compilation aborted at blib/lib/Apache/AuthCookieDBI.pm line 41. Compilation failed in require at test.pl line 11. BEGIN failed--compilation aborted at test.pl line 11. make: *** [test_dynamic] Error 255 When I do a 'make install' after this, it appears to install correctly. However I run into trouble when I try to modify my httpd.conf file to use Apache::AuthCookieDBI. When I add the line --- PerlModule Apache::AuthCookieDBI to my httpd.conf file and restart the server, the server returns a message that it has restarted successfully, but in fact doesn't actually start. There are no error messages on my screen or in the error log that indicate anything being wrong but the server is simply not running. In addition to the above PerlModule line, I've also included the following in my httpd.conf file with the appropriate values --- PerlSetVar WhatEverPath / PerlSetVar WhatEverLoginScript /login.pl # These must be set PerlSetVar WhatEverDBI_DSN "DBI:mysql:database=test" PerlSetVar WhatEverDBI_SecretKeyFile /etc/httpd/foo.com.key # These are optional, the module sets sensible defaults. PerlSetVar WhatEverDBI_User "mysql" PerlSetVar WhatEverDBI_Password "mypassword" PerlSetVar WhatEverDBI_UsersTable "users" PerlSetVar WhatEverDBI_UserField "username" PerlSetVar WhatEverDBI_PasswordField "password" PerlSetVar WhatEverDBI_CryptType "none" PerlSetVar WhatEverDBI_GroupsTable "groups" PerlSetVar WhatEverDBI_GroupField "grp" PerlSetVar WhatEverDBI_GroupUserField "user" PerlSetVar WhatEverDBI_EncryptionType "none" PerlSetVar WhatEverDBI_SessionLifetime 00-24-00-00 Directory /foo/protected AuthType Apache::AuthCookieDBI AuthName WhatEver PerlAuthenHandler Apache::AuthCookieDBI-authenticate PerlAuthzHandler Apache::AuthCookieDBI-authorize require valid-user /Directory Files LOGIN AuthType Apache::AuthCookieDBI AuthName WhatEver SetHandler perl-script PerlHandler Apache::AuthCookieDBI-login /Files The above directory and files locations are unchanged from when I got AuthCookie/AuthCookieHandler to work, except that I change the references from AuthCookieHandler to AuthCookieDBI. Also, the file /etc/httpd/foo.com.key exists, contains a long text string in the first line and is readable only by root. The problematic line in the httpd.conf file seems to be the PerlModule Apache::AuthCookieDBI line. If I comment it out, the server starts up with no problems whatsoever. Of course I need to use AuthCookieDBI, hence the issue.. Can someone possibly shed some light on this? Its completely baffling me and the lack of error messages in both the error log and on screen is only compounding the problem. If it helps, I am running Apache 1.3.14, mod_perl 1.25 and using Apache-AuthCookieDBI-1.18 and Apache-AuthCookie-2.011. Thanks a ton in advance for your help! Renu
Newbie question about AuthCookieDBI
Hi all, I am a newbie user of mod_perl trying to work with Apache::AuthCookieDBI and have been running into several obstacles. I'm hoping someone can point me in the right direction. I just installed Apache::AuthCookie successfully and was able to get it to work with the necessary changes in my httpd.conf file. Now I want to use Apache::AuthCookieDBI to authenticate against a database table. However during my installation, while doing the 'make test' I get the following error message --- Can't locate object method "module" via package "Apache" at /usr/local/lib/perl5/site_perl/5.6.0/Apache/DBI.pm line 202. Compilation failed in require at blib/lib/Apache/AuthCookieDBI.pm line 41. BEGIN failed--compilation aborted at blib/lib/Apache/AuthCookieDBI.pm line 41. Compilation failed in require at test.pl line 11. BEGIN failed--compilation aborted at test.pl line 11. make: *** [test_dynamic] Error 255 When I do a 'make install' after this, it appears to install correctly. However I run into trouble when I try to modify my httpd.conf file to use Apache::AuthCookieDBI. When I add the line --- PerlModule Apache::AuthCookieDBI to my httpd.conf file and restart the server, the server returns a message that it has restarted successfully, but in fact doesn't actually start. There are no error messages on my screen or in the error log that indicate anything being wrong but the server is simply not running. In addition to the above PerlModule line, I've also included the following in my httpd.conf file with the appropriate values --- PerlSetVar WhatEverPath / PerlSetVar WhatEverLoginScript /login.pl # These must be set PerlSetVar WhatEverDBI_DSN "DBI:mysql:database=test" PerlSetVar WhatEverDBI_SecretKeyFile /etc/httpd/foo.com.key # These are optional, the module sets sensible defaults. PerlSetVar WhatEverDBI_User "mysql" PerlSetVar WhatEverDBI_Password "mypassword" PerlSetVar WhatEverDBI_UsersTable "users" PerlSetVar WhatEverDBI_UserField "username" PerlSetVar WhatEverDBI_PasswordField "password" PerlSetVar WhatEverDBI_CryptType "none" PerlSetVar WhatEverDBI_GroupsTable "groups" PerlSetVar WhatEverDBI_GroupField "grp" PerlSetVar WhatEverDBI_GroupUserField "user" PerlSetVar WhatEverDBI_EncryptionType "none" PerlSetVar WhatEverDBI_SessionLifetime 00-24-00-00 Directory /foo/protected AuthType Apache::AuthCookieDBI AuthName WhatEver PerlAuthenHandler Apache::AuthCookieDBI-authenticate PerlAuthzHandler Apache::AuthCookieDBI-authorize require valid-user /Directory Files LOGIN AuthType Apache::AuthCookieDBI AuthName WhatEver SetHandler perl-script PerlHandler Apache::AuthCookieDBI-login /Files The above directory and files locations are unchanged from when I got AuthCookie/AuthCookieHandler to work, except that I change the references from AuthCookieHandler to AuthCookieDBI. Also, the file /etc/httpd/foo.com.key exists, contains a long text string in the first line and is readable only by root. The problematic line in the httpd.conf file seems to be the PerlModule Apache::AuthCookieDBI line. If I comment it out, the server starts up with no problems whatsoever. Of course I need to use AuthCookieDBI, hence the issue.. Can someone possibly shed some light on this? Its completely baffling me and the lack of error messages in both the error log and on screen is only compounding the problem. If it helps, I am running Apache 1.3.14, mod_perl 1.25 and using Apache-AuthCookieDBI-1.18 and Apache-AuthCookie-2.011. Thanks a ton in advance for your help! Renu