You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Brian Millett <bp...@ec-group.com> on 2003/02/12 23:16:04 UTC

mod_perl 2.0 question about $r->connection->auth_type

Hi,
  I've just about got the Apache::AuthCookieDBI to work with Apache
2.0.44 & mod_perl 1.99_09-dev, but I ran into a problem with the
$r->connection object not having "auth_type" or "user" defined.  The
$r->auth_type work just fine.  Are these the same reference?  What
should I look for, or use?

Thanks.
-- 
Brian Millett                    
Enterprise Consulting Group     "Shifts in paradigms
(314) 205-9030                     often cause nose bleeds."
bpm@ec-group.com                   Greg Glenn




Re: mod_perl 2.0 question about $r->connection->auth_type

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
>>>>   I've just about got the Apache::AuthCookieDBI to work with Apache
>>>> 2.0.44 & mod_perl 1.99_09-dev, but I ran into a problem with the
>>>> $r->connection object not having "auth_type" or "user" defined.  The
>>>> $r->auth_type work just fine.  Are these the same reference?  What
>>>> should I look for, or use?

[snip]

> Geoff is working on the proper fix for your original problem. When 
> that's done please check that test again. (see the dev list for 
> developments)

the fix has been committed, so you should be good to go based on the 
discussions we had over on dev@.

remember, we added a new method, so you'll have to build mod_perl from CVS 
and make realclean before building if you want to pick up the new method.

lemme know how it goes.

--Geoff




Re: mod_perl 2.0 question about $r->connection->auth_type

Posted by Stas Bekman <st...@stason.org>.
Brian P Millett wrote:
> Stas Bekman wrote:
> 
>> Brian Millett wrote:
>>
>>> Hi,
>>>   I've just about got the Apache::AuthCookieDBI to work with Apache
>>> 2.0.44 & mod_perl 1.99_09-dev, but I ran into a problem with the
>>> $r->connection object not having "auth_type" or "user" defined.  The
>>> $r->auth_type work just fine.  Are these the same reference?  What
>>> should I look for, or use?
>>
>>
>>
>> They don't live in the connection record in 2.0, only in the request 
>> record. I've added Apache::compat methods for backwards compatibility. 
>> Notice that you need to set up:
>>
>>    PerlOptions +GlobalRequest
>>
>> for that location.
>>
>> Either use the latest modperl-2.0 cvs or apply this patch to get the 
>> functionality:
>> http://marc.theaimsgroup.com/?l=apache-modperl-cvs&m=104509336821414&w=2
> 
> 
> Thanks Stas.  However the latest cvs co (as 10 minutes ago) returns this 
> error testing:
> 
> compat/conn_authen.............NOK 1# Failed test 1 in 
> compat/conn_authen.t at line 11
> compat/conn_authen.............FAILED test 
> 1                                   Failed 1/1 tests, 0.00% okay
> 
>  From the error_log:
> [Thu Feb 13 09:10:04 2003] [error] [client 127.0.0.1] Can't locate 
> object method "auth_type" via package "Apache::Connection" at 
> /home/bpm/compile_area/cvs_apache/modperl-2.0/t/response/TestCompat/conn_authen.pm 
> line 25.
> 
> 
> This is against http-2.0.44 on a solaris 9 box with gcc version 3.1.

Geoff is working on the proper fix for your original problem. When that's done 
please check that test again. (see the dev list for developments)


-- 


__________________________________________________________________
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


Re: mod_perl 2.0 question about $r->connection->auth_type

Posted by Brian P Millett <bp...@ec-group.com>.
Stas Bekman wrote:

> Brian Millett wrote:
>
>> Hi,
>>   I've just about got the Apache::AuthCookieDBI to work with Apache
>> 2.0.44 & mod_perl 1.99_09-dev, but I ran into a problem with the
>> $r->connection object not having "auth_type" or "user" defined.  The
>> $r->auth_type work just fine.  Are these the same reference?  What
>> should I look for, or use?
>
>
> They don't live in the connection record in 2.0, only in the request 
> record. I've added Apache::compat methods for backwards compatibility. 
> Notice that you need to set up:
>
>    PerlOptions +GlobalRequest
>
> for that location.
>
> Either use the latest modperl-2.0 cvs or apply this patch to get the 
> functionality:
> http://marc.theaimsgroup.com/?l=apache-modperl-cvs&m=104509336821414&w=2

Thanks Stas.  However the latest cvs co (as 10 minutes ago) returns this 
error testing:

compat/conn_authen.............NOK 1# Failed test 1 in 
compat/conn_authen.t at line 11
compat/conn_authen.............FAILED test 
1                                
    Failed 1/1 tests, 0.00% okay

 From the error_log:
[Thu Feb 13 09:10:04 2003] [error] [client 127.0.0.1] Can't locate 
object method "auth_type" via package "Apache::Connection" at 
/home/bpm/compile_area/cvs_apache/modperl-2.0/t/response/TestCompat/conn_authen.pm 
line 25.


This is against http-2.0.44 on a solaris 9 box with gcc version 3.1.



-- 
Brian Millett                    
Enterprise Consulting Group   "Shifts in paradigms
(314) 205-9030               often cause nose bleeds."
bpm@ec-group.com                           Greg Glenn



Re: mod_perl 2.0 question about $r->connection->auth_type

Posted by Stas Bekman <st...@stason.org>.
Brian Millett wrote:
> Hi,
>   I've just about got the Apache::AuthCookieDBI to work with Apache
> 2.0.44 & mod_perl 1.99_09-dev, but I ran into a problem with the
> $r->connection object not having "auth_type" or "user" defined.  The
> $r->auth_type work just fine.  Are these the same reference?  What
> should I look for, or use?

They don't live in the connection record in 2.0, only in the request record. 
I've added Apache::compat methods for backwards compatibility. Notice that you 
need to set up:

    PerlOptions +GlobalRequest

for that location.

Either use the latest modperl-2.0 cvs or apply this patch to get the 
functionality:
http://marc.theaimsgroup.com/?l=apache-modperl-cvs&m=104509336821414&w=2

Also the online docs were updated (pending automatic update)

__________________________________________________________________
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