You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by raja agireddy <ta...@gmail.com> on 2005/05/13 16:32:01 UTC

Apache::RequestRec::notes stays wrong usage

Hello,

I have installed
httpd-2.0.53 ---> Apache
mod_perl-2.0.0-RC4 ---> modperl
Authen-Smb-0.91
Apache-AuthenSmb-0.72
Apache-AuthenCache-1.00

I am getting the following error.
[Thu May 12 17:12:36 2005] [error] [client 135.43.15.119] Usage:
Apache::RequestRec::notes(obj, val=NULL) at
/raj/perl/lib/site_perl/5.8.6/Apache/AuthenCache.pm line 302.\n

Following is the code at line 302
$r->notes('AuthenCache' => 'miss');

I am trying to configure the Apache-AuthenCache module in order to
have seesion timeout after specified time.

Any advice would be greatly appreciated.

Regards,
Raja

Re: Apache::RequestRec::notes stays wrong usage

Posted by Perrin Harkins <pe...@elem.com>.
raja agireddy wrote:
> Perrin,
> 
> I have installed Apache::Session manger but somehow it is not working.
> I am not being prompted for password after the specified timeout. Is
> there a way to debug this issue. I have added the following in the
> httpd.conf file
> ************************
> PerlSetVar SessionManagerTracking On
> PerlSetVar SessionManagerExpire 90
> PerlSetVar SessionManagerInactivity 90
> **************************
> 
> FYI:
> I have added the following code to the Smb.pm script. I did this to
> stop the password request popups in case of multi frame web pages
> ******************************************
> use Fcntl qw(:flock);
>   open S, "> /home/gaccr1/fdmg/web2/logs/AuthenSmb.lck" or
>   die "Can't open AuthenSmb.lck: $!\n";
>   flock S, LOCK_EX;
>   close S;
> ************************************
> Any direction would be greatly appreciated.

I don't think you understood what I was saying.  Have you made any 
effort to connect the sessions to SMB?

I meant for you to stop using AuthenSMB, take the SMB code from it, and 
use that to write your own login system that is tracked with cookies 
using Apache::SessionManager.

If you want to do it without writing any code, the only thing available 
is Apache::AuthExpire, but it will not work with all browsers.

- Perrin

Re: Apache::RequestRec::notes stays wrong usage

Posted by raja agireddy <ta...@gmail.com>.
Perrin,

I have installed Apache::Session manger but somehow it is not working.
I am not being prompted for password after the specified timeout. Is
there a way to debug this issue. I have added the following in the
httpd.conf file
************************
PerlSetVar SessionManagerTracking On
PerlSetVar SessionManagerExpire 90
PerlSetVar SessionManagerInactivity 90
**************************

FYI:
I have added the following code to the Smb.pm script. I did this to
stop the password request popups in case of multi frame web pages
******************************************
use Fcntl qw(:flock);
  open S, "> /home/gaccr1/fdmg/web2/logs/AuthenSmb.lck" or
  die "Can't open AuthenSmb.lck: $!\n";
  flock S, LOCK_EX;
  close S;
************************************
Any direction would be greatly appreciated.

Regards,
Raja

On 5/13/05, Perrin Harkins <pe...@elem.com> wrote:
> raja agireddy wrote:
> > I have installed
> > httpd-2.0.53 ---> Apache
> > mod_perl-2.0.0-RC4 ---> modperl
> > Authen-Smb-0.91
> > Apache-AuthenSmb-0.72
> > Apache-AuthenCache-1.00
> >
> > I am getting the following error.
> > [Thu May 12 17:12:36 2005] [error] [client 135.43.15.119] Usage:
> > Apache::RequestRec::notes(obj, val=NULL) at
> > /raj/perl/lib/site_perl/5.8.6/Apache/AuthenCache.pm line 302.\n
> 
> Apache::AuthenCache doesn't support mod_perl 2.  You can try using it
> with Apache2::compat:
> 
> http://perl.apache.org/docs/2.0/api/Apache2/compat.html
> 
> However, this will not make sessions time out.  All this module does is
> cache auth from other modules, and the timeout setting relates to the
> cache, not the session.
> 
> Making HTTP auth time out is not going to be easy.  There is no reliable
> way to invalidate auth credentials with all browsers.  However, if this
> is an antranet and you have control of what browsers are used, it may
> work.  Look at Apache::AuthExpire.
> 
> Alternatively, you could use cookies, with Apache::AuthCookie or
> Apache::SessionManager.
> 
> - Perrin
>

Re: Apache::RequestRec::notes stays wrong usage

Posted by Perrin Harkins <pe...@elem.com>.
raja agireddy wrote:
> I have installed
> httpd-2.0.53 ---> Apache
> mod_perl-2.0.0-RC4 ---> modperl
> Authen-Smb-0.91
> Apache-AuthenSmb-0.72
> Apache-AuthenCache-1.00
> 
> I am getting the following error.
> [Thu May 12 17:12:36 2005] [error] [client 135.43.15.119] Usage:
> Apache::RequestRec::notes(obj, val=NULL) at
> /raj/perl/lib/site_perl/5.8.6/Apache/AuthenCache.pm line 302.\n

Apache::AuthenCache doesn't support mod_perl 2.  You can try using it 
with Apache2::compat:

http://perl.apache.org/docs/2.0/api/Apache2/compat.html

However, this will not make sessions time out.  All this module does is 
cache auth from other modules, and the timeout setting relates to the 
cache, not the session.

Making HTTP auth time out is not going to be easy.  There is no reliable 
way to invalidate auth credentials with all browsers.  However, if this 
is an antranet and you have control of what browsers are used, it may 
work.  Look at Apache::AuthExpire.

Alternatively, you could use cookies, with Apache::AuthCookie or 
Apache::SessionManager.

- Perrin