You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by "Ryan C. Spaulding" <rs...@mail.arc.nasa.gov> on 2004/08/11 00:58:39 UTC

ENV problems when upgrading to Apache2.0

Hi,

Sorry for my lack of Embperl knowledge but I am a system administrator 
that had to take over some code. I recently upgraded Apache from 1.3.x 
to 2.0.46 and now the REMOTE_USER environment variable is not getting 
set. Currently I am running Embperl version 1.3.4 as a cgi. I did a 
couple of test printing out the whole contents of $ENV and it looks 
like REMOTE_USER is the only thing not getting propagated in the 
Embperl script. I created a perl program to do the same thing and it 
seems to work fine that way. Looking at the log files it seems that 
with Embperl running as a cgi the request is actually a redirect. Is 
there an option I can give to Embperl or Apache to redirect the 
REMOTE_USER variable as well?

Thank you for any help,

Ryan Spaulding


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: ENV problems when upgrading to Apache2.0

Posted by "Ryan C. Spaulding" <rs...@mail.arc.nasa.gov>.
Hi Gerald,

I was thinking of adding my own ENV to solve this problem.

I will let you know how it goes.

Thank you,

Ryan
On Aug 10, 2004, at 9:14 PM, Gerald Richter wrote:

>> Looking at the log
>> files it seems that with Embperl running as a cgi the request
>> is actually a redirect.
>
> That depends on the way you configure Apache, but normaly Apache will  
> make
> an internal redirect to call Embperl. I am not quite sure how Apache 2
> handles REMOTE_USER on redirects, but normaly it is only set when an
> authentication is required. Maybe this is not done for the redirect.
>
>> Is there an option I can give to
>> Embperl or Apache to redirect the REMOTE_USER variable as well?
>>
>
> At the top of your embpcgi.pl add
>
> $ENV{REMOTE_USER} = $ENV_{REDIRECT_REMOTE_USER} ;
>
> But you have to be aware that you then only see the user from the main
> request and not from the internal redirect. As you decribed things  
> that is
> what you want, but you should keep it in mind.
>
> Gerald
>
>
>
> ----------------------------------------------------------------------- 
> ----
> Gerald Richter            ecos electronic communication services gmbh
> IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl
>
> Post:       Tulpenstrasse 5          D-55276 Dienheim b. Mainz
> E-Mail:     richter@ecos.de          Voice:   +49 6133 939-122
> WWW:        http://www.ecos.de/      Fax:     +49 6133 939-333
> ----------------------------------------------------------------------- 
> ----
> ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
> ----------------------------------------------------------------------- 
> ----
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


RE: ENV problems when upgrading to Apache2.0

Posted by Gerald Richter <ri...@ecos.de>.
> Looking at the log 
> files it seems that with Embperl running as a cgi the request 
> is actually a redirect.

That depends on the way you configure Apache, but normaly Apache will make
an internal redirect to call Embperl. I am not quite sure how Apache 2
handles REMOTE_USER on redirects, but normaly it is only set when an
authentication is required. Maybe this is not done for the redirect.

> Is there an option I can give to 
> Embperl or Apache to redirect the REMOTE_USER variable as well?
> 

At the top of your embpcgi.pl add

$ENV{REMOTE_USER} = $ENV_{REDIRECT_REMOTE_USER} ;

But you have to be aware that you then only see the user from the main
request and not from the internal redirect. As you decribed things that is
what you want, but you should keep it in mind.

Gerald



---------------------------------------------------------------------------
Gerald Richter            ecos electronic communication services gmbh
IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl

Post:       Tulpenstrasse 5          D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de          Voice:   +49 6133 939-122
WWW:        http://www.ecos.de/      Fax:     +49 6133 939-333
---------------------------------------------------------------------------
ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
---------------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org