Marina Markus wrote: > Hello, > > With Geoffrey Young's generous help I have successfully implemented > authentication using my own handler subroutine defined as PerlAuthenHandler.
:) > This works OK in RedHat but not on SGI (IRIX 6.2). Call to the handler fails > complaining that it cannot find request object methods, be it "connection" > or "get_basic_auth_pw", saying, for example: > > [Mon Nov 1 12:54:13 2004] [error] Can't locate object method > "get_basic_auth_pw" via package "Our::Auth" at > /usr/local/lib/perl5/site_perl/5.005/Our/Auth.pm line 16, <DATA> chunk > 225.\n well, that message says that it can't find get_basic_auth_pw() via Our::Auth. it should be looking for it via the Apache class, not Our::Auth. if you're looking for it via $r blessed into Our::Auth you need to make sure that you're doing subclassing properly for mod_perl (which is a bit different than normal perl subclasses). see http://www.modperlcookbook.org/code/ch10/Cookbook/Apache.pm for an example. if you're not trying any subclassing tricks then something is definitely amuck - $r should be an 'Apache' object (or 'Apache::RequestRec' in mp2) when you call $r->note_basio_auth_pw. > > These methods should come with the installation of mod_perl, shouldn't they? yes. > A bare installation of Apache 1.3.31+mod_perl 1.29 on a RedHat works OK > without demanding any addition Perl modules to be installed. that's right. are you rolling your own on SGI or using a pre-compiled package? if the package is pre-compliled you might want to make sure that it's mod_perl 1.2X and not mod_perl 1.99_XX, which is the precursor to mod_perl 2.0 and a completely different beast. > > Maybe the ancient Perl version (5.005) is to blame? nope. as I said, based on the message above something is amuck that looks to have nothing to do with mod_perl, but rather the way that get_basic_auth_pw() is being invoked. HTH --Geoff -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html