You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by David W Smith <dw...@well.ox.ac.uk> on 2004/05/28 19:43:21 UTC

Apache::Connection problem

Hi,

I'm wondering if anyone has any advice about how to overcome the
following problem. My setup is:

Apache/2.0.49 (Unix) mod_perl/1.99_14 Perl/v5.8.4 mod_ssl/2.0.49
OpenSSL/0.9.7d PHP/4.3.6

on a Solaris 8 box.

In my apache error log I have warnings containing the string:

Can't locate object method "user" via package "Apache::Connection" at
/usr/local/lib/perl5/site_perl/5.8.3/Apache/AuthenIMAP.pm line 70.\n

I had 4 other such error messages relating to various 'object methods',
for example, 'get_basic_auth_pw'. So I ran the command:

perl -MApache2 -MModPerl::MethodLookup -e print_method get_basic_auth_pw

Which returned:

To use method 'get_basic_auth_pw' add:
        use Apache::Access ();

So I added the line 'use Apache::Access;' to AuthenIMAP.pm and the error
message went away.

When I run:

perl -MApache2 -MModPerl::MethodLookup -e print_method user

I get:

There is more than one class with method 'user'
try one of:
        use APR::Finfo ();
        use Apache::RequestRec ();
        use APR::URI ();

But this time no matter which of the above 3, or how many, I add to
AuthenIMAP.pm the error message in the Apache error log persists and a
page stating 'Internal Server Error' appears when I try and access
Apache's default web page.

Any ideas or fixes appreciated.

Thanks.

David Smith

University of Oxford

-- 
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


Re: Apache::Connection problem

Posted by Stas Bekman <st...@stason.org>.
David W Smith wrote:
[...]
> In my apache error log I have warnings containing the string:
> 
> Can't locate object method "user" via package "Apache::Connection" at
> /usr/local/lib/perl5/site_perl/5.8.3/Apache/AuthenIMAP.pm line 70.\n
[...]
> When I run:
> 
> perl -MApache2 -MModPerl::MethodLookup -e print_method user
> 
> I get:
> 
> There is more than one class with method 'user'
> try one of:
>         use APR::Finfo ();
>         use Apache::RequestRec ();
>         use APR::URI ();
> 
> But this time no matter which of the above 3, or how many, I add to
> AuthenIMAP.pm the error message in the Apache error log persists and a
> page stating 'Internal Server Error' appears when I try and access
> Apache's default web page.

That's because it no longer lives in the connection record:
http://perl.apache.org/docs/2.0/user/porting/compat.html#C__connection_E_gt_user_



-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
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