Michael Dearman <[EMAIL PROTECTED]> wrote:

> I've come close to figuring this one out buy following some of the
> questions I've seen here. But...
>
> <H1>Hello $ENV{REMOTE_HOST}</H1>
>
> The remote host doesn't show. Printing out the %ENV, it tain't there.
> But where does Perl get it. From CGI.pm (which is installed) or where?

Stas Bekman wrote:

> This is an easy prove that %ENV is set (while not all variables are
> present as with mod_cgi, particularly REMOTE_HOST isn't there...)

To my knowledge, seems like all environment variables are present. We are
making extensive use of %ENV in our mod_perl content handlers - the $r's
subprocess environment is completely copied over to %ENV for the last stage of
the Apache request cycle (including additional session environment variables
you might have set along the way in your authentication handlers).

However, REMOTE_HOST is not even present for mod_cgi anymore, Apache changed
the way they handle that environment variable with Version 1.3, so that now it
is standards compliant and rather useless, see
http://www.apache.org/docs/upgrading_to_1_3.html


> REMOTE_HOST CGI variable changed. In Apache 1.2 and earlier, the REMOTE_HOST 
>environment variable made available to CGI scripts was set
>      to either the full DNS name of the client, or else to the client's IP address 
>if the name was not known. This behaviour differed from that specified by
>      the CGI specification, which defines this variable as being NULL if the name 
>isn't known. In Apache 1.3, we have made this correction.
>      REMOTE_ADDR always contains the client's IP address, but REMOTE_HOST is only 
>defined when the server has been able to determine the client's
>      DNS name.
>

I think that is what you are seeing, rather than any problem with the
environment in general.

- Gerd.

begin:vcard 
n:Kortemeyer;Gerd
tel;fax:(517) 432-2175
tel;work:(517) 432-5468
x-mozilla-html:FALSE
url:http://www.lite.msu.edu/kortemeyer/
org:LITE Lab;DSME MSU
version:2.1
email;internet:[EMAIL PROTECTED]
title:Instructional Technology Specialist
adr;quoted-printable:;;123 North Kedzie Labs=0D=0AMichigan State University;East Lansing;MI;48824;USA
fn:Gerd Kortemeyer
end:vcard

Reply via email to