This looks like a simple error to debug and solve, but I can't see in the actual code what the issue is ... The Error:
[Thu Mar 4 16:55:00 2004] [error] auth_type TestCookie::AuthCookieHan +dler [Thu Mar 4 16:55:00 2004] [error] auth_name TestCookie [Thu Mar 4 16:55:00 2004] [error] ses_key_cookie [Thu Mar 4 16:55:00 2004] [error] uri /protected/ Can't locate object method "request" via package "Apache" at /home/htt +pd/htdocs/login.cgi line 5.
Looks all normal, since "can't find method foo" errors usually mean a package isn't used. but in my httpd.conf:
<Perl> use lib qw# /home/httpd/htdocs/libs #; </Perl> + + PerlModule Apache::AuthCookie PerlModule TestCookie::AuthCookieHandler PerlSetVar TestCookiePath / PerlSetVar TestCookieLoginScript /login.cgi PerlSetVar AuthCookieDebug 3 + + # These documents require user to be logged in. <Location /protected> AuthType TestCookie::AuthCookieHandler AuthName TestCookie PerlAuthenHandler TestCookie::AuthCookieHandler->authenticate PerlAuthzHandler TestCookie::AuthCookieHandler->authorize Require user programmer </Location> + + + + #this is the action of the login.pl script above. <Files LOGIN> AuthType TestCookie::AuthCookieHandler AuthName TestCookie SetHandler perl-script PerlHandler TestCookie::AuthCookieHandler->login </Files> <Location /perl-status> SetHandler perl-script PerlHandler Apache::Status </Location>
I'm using the sample config to make sure I can get things configured correctly. TestCookie::AuthCookieHandler gets called, and it looks like this:
package TestCookie::AuthCookieHandler; use strict; use Apache; use Apache::Constants qw(:common); use Apache::AuthCookie; use vars qw($VERSION @ISA); + + $VERSION = substr(q$Revision: 1.2 $, 10); @ISA = qw(Apache::AuthCookie);
( it's just Sample::AuthCookieHandler from the distro renamed and moved. )

so, i'm including the Apache module, and I have this as my server setup:

Server Version: Apache/1.3.27 (Unix) Resin/2.1.11 PHP/4.3.1 mod_perl/1 +.27
so i have a mod_perl enabled server, Apache::AuthCookie installed ... everything *should* work ... but it doesn't, and i'm lost ... any pointers?

In reply to Apache::AuthCookie woes by geektron

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.