Thanks, If this is the case, How can we preserve the REMOTE_USER value and forward/redirect to the other application ( running on same Apache Server) which is based on the REMOTE_USER environment variable, which is set in my perl module in the first application.
I was under the impression $ENV{'REMOTE_USER') variable can be used for such purposes. Phil Whelan wrote: > > Hi Tracy12, > >> $r->content_type('text/html'); >> $r->header_out->set(Location => $urlNew); >> return Apache2::Const::REDIRECT; > > When you do the above, you're actually returning context to the > client, giving them the decision to follow the redirect information or > not. They most probably will (especially if it's a web browser). All > server side information will be lost and the User.pl request will be a > new one. > > Cheers, > Phil > > > On 11/01/07, Tracy12 <[EMAIL PROTECTED]> wrote: >> >> 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. >> >> > > > -- > Website: http://philw.co.uk > Skype: philwhelan76 > UK Mobile: +447968828856 > UK Landline : +441212882897 > Email : [EMAIL PROTECTED] > MSN Messenger : [EMAIL PROTECTED] > iChat: [EMAIL PROTECTED] > > -- View this message in context: http://www.nabble.com/Lost-ENV-variable-value-.........-tf2956856.html#a8286928 Sent from the mod_perl - General mailing list archive at Nabble.com.