Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 91755 invoked from network); 11 Jan 2007 04:21:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jan 2007 04:21:36 -0000 Received: (qmail 83984 invoked by uid 500); 11 Jan 2007 04:21:38 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 83956 invoked by uid 500); 11 Jan 2007 04:21:38 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 83945 invoked by uid 99); 11 Jan 2007 04:21:37 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jan 2007 20:21:37 -0800 X-ASF-Spam-Status: No, hits=0.9 required=10.0 tests=FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of lists@nabble.com designates 72.21.53.35 as permitted sender) Received: from [72.21.53.35] (HELO talk.nabble.com) (72.21.53.35) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jan 2007 20:21:26 -0800 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1H4rR3-0001Xg-Ob for modperl@perl.apache.org; Wed, 10 Jan 2007 20:21:05 -0800 Message-ID: <8271631.post@talk.nabble.com> Date: Wed, 10 Jan 2007 20:21:05 -0800 (PST) From: Tracy12 To: modperl@perl.apache.org Subject: Lost ENV variable value ......... MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: j_lalith@yahoo.com X-Virus-Checked: Checked by ClamAV on apache.org 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. 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. 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.