Hi,

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
$ENV{'REMOTE_USER'}.

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

$r->connection->user($test_user);
my $user1 = $r->connection->user;
my $urlNew = "http://localhost/rUser.pl?user=$user1";;
##my $urlNew = "http://mail.yahoo.com";;
$r->content_type('text/html');
$r->header_out->set(Location => $urlNew);

return Apache2::Const::REDIRECT;
}

my CGI perl script (http://localhost/rUser.pl) 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
</Location>

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

What am I doing wrong.

Thanks,









-- 
View this message in context: 
http://www.nabble.com/Lost-ENV-variable-value-.........-tf2956856.html#a8271631
Sent from the mod_perl - General mailing list archive at Nabble.com.

Reply via email to