Apache::AuthCookie causing strange-"Use of uninitialized value."
I use Apache::AuthCookie 3.04, which seems to be the latest version, under Apache/1.3.26 Ben-SSL/1.48 (Unix) Debian GNU/Linux PHP/4.1.2 mod_perl/1.26. When I use "PerlFixupHandler Apache::AuthCookie->recognize_user", Apache writes "Use of uninitialized value." in errorlog for each request and subrequest. I have tried editing AuthCookie.pm, checking everything with defined(), even substituting recognize_user with a stub function. Still it is there. I am not sure it comes from perl, because perl use to say "at line X" too. But from what else? This has been up before, but no one answered it then: http://www.jsw4.net/info/list-archives/mod_perl/02-08/msg00591.html /Per Eric -- ^): Per Eric Rosén http://rosnix.nu/~per/ / [EMAIL PROTECTED] GPG 7A7A BD68 ADC0 01E1 F560 79FD 33D1 1EC3 1EBB 7311
Re: Apache::AuthCookie causing strange-"Use of uninitialized value."
Hi! On Fri, Sep 12, 2003 at 01:46:24PM +0200, Per Eric Ros?n wrote: > I use Apache::AuthCookie 3.04, which seems to be the latest version, under > Apache/1.3.26 Ben-SSL/1.48 (Unix) Debian GNU/Linux PHP/4.1.2 mod_perl/1.26. I'm using quite the same setup (without PHP and ssl) and do not get those errors. > When I use "PerlFixupHandler Apache::AuthCookie->recognize_user", Apache You have to subclass Apache::AuthCookie. This should be something like: PerlFixupHandler Your::Sublass->recognize_user Maybe this is causing the problem? -- #!/usr/bin/perl http://domm.zsi.at for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}
Re: Apache::AuthCookie causing strange "Use of uninitialized value."
Thanks for your response! > You have to subclass Apache::AuthCookie. This should be something like: > PerlFixupHandler Your::Sublass->recognize_user Well, I do. I just pasted the wrong text (from the 2002 mail). The actual configuration snippet is: AuthType TAS::Cookie AuthName TAS PerlFixupHandler TAS::Cookie->recognize_user Another observation: It does only appear when no cookie is received. When users are logged in, everything is fine. And, yes, I checked recognize_user and put in a defined() around the cookie check. No result. Even a bad cookie (manually deleting the session) makes it quiet. /Per Eric -- ^): Per Eric Rosén http://rosnix.nu/~per/ / [EMAIL PROTECTED] GPG 7A7A BD68 ADC0 01E1 F560 79FD 33D1 1EC3 1EBB 7311
WE: Apache::AuthCookie causing strange-"Use of uninitialized value."
It is a warning Perl gives on strict, if variables have 0 values or are NULL. The example below will trigger that warning: ### #!/usr/sbin/perl -w use strict; Xyz (fist_value, second_value); # Here we call sub xyz with 2 arguments Sub xyz { my ($x,$y,$z)@_; print $x; print $y; print $z; # This will trigger the warning, because $z has no value. } To arrest the warning, I may use something like this: Print $z if $z; ### -Ursprüngliche Nachricht- Von: Per Eric Rosén [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 12. September 2003 13:46 An: [EMAIL PROTECTED] Betreff: Apache::AuthCookie causing strange-"Use of uninitialized value." I use Apache::AuthCookie 3.04, which seems to be the latest version, under Apache/1.3.26 Ben-SSL/1.48 (Unix) Debian GNU/Linux PHP/4.1.2 mod_perl/1.26. When I use "PerlFixupHandler Apache::AuthCookie->recognize_user", Apache writes "Use of uninitialized value." in errorlog for each request and subrequest. I have tried editing AuthCookie.pm, checking everything with defined(), even substituting recognize_user with a stub function. Still it is there. I am not sure it comes from perl, because perl use to say "at line X" too. But from what else? This has been up before, but no one answered it then: http://www.jsw4.net/info/list-archives/mod_perl/02-08/msg00591.html /Per Eric -- ^): Per Eric Rosén http://rosnix.nu/~per/ / [EMAIL PROTECTED] GPG 7A7A BD68 ADC0 01E1 F560 79FD 33D1 1EC3 1EBB 7311