perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tracy12 <>
Subject Lost ENV variable value .........
Date Thu, 11 Jan 2007 04:21:05 GMT


My objective is to update the REMOTE_USER variable within the perl module
and check whether
it is set in side  CGI script by refering to the variable

I was successful setting value withing the module but $ENV{'REMOTE_USER'}
inside the CGI prints nothing (empty). Why does it got removed after the
function and redirection.

My perl module look as follows

sub test_Method {
my $self= shift;
my $r = shift;
my $test_user="444584";

my $user1 = $r->connection->user;
my $urlNew = "http://localhost/$user1";
##my $urlNew = "";
$r->header_out->set(Location => $urlNew);

return Apache2::Const::REDIRECT;

my CGI perl script (http://localhost/ prints the REMOTE_USER
variable as follows.

  print "value of remote port is ",$ENV{'REMOTE_USER'};

I refer to my perl module from httpd.conf as follows.
<Location /goto1>
SetHandler perl-script
PerlHandler AuthCAS->test_Method

I am using mod_perl2.0, can somebody let me know why the REMOTE_USER
variable is missing.

What am I doing wrong.


View this message in context:
Sent from the mod_perl - General mailing list archive at

View raw message