Apache environment strangeness

Paul Lussier p.lussier at comcast.net
Fri Apr 27 10:44:10 EDT 2007


Dan Coutu <coutu at snowy-owl.com> writes:

> Background: RHEL 4, Apache 2.0.52
>
> An intranet site that uses basic authentication for login has some CGI
> code that checks the value of REMOTE_USER in order to determine the
> login name of the current visitor. Pretty simple eh?
>
> The strange part is that in PHP I can fetch the REMOTE_USER value just
> fine and using phpinfo() shows it properly defined.
>
>>From within the very same browser I then visit a URL that is a perl cgi
> program that simply dumps the environment out and it show that
> REMOTE_USER *is not defined*! Huh? There are scripts in other languages
> that also fail to find a definition for REMOTE_USER. I don't get it.

Please remember:

  Always google first, check documentation second[1], ask on a list third :)

This took me 2.5 seconds to find:

 http://httpd.apache.org/docs/1.3/misc/FAQ.html#remote-user-var

Footnotes:

[1] googling first more often than not leads to the correct page in
    the docs faster than visiting them first and searching there.

-- 
Seeya,
Paul


More information about the gnhlug-discuss mailing list