Gerd Kortemeyer wrote:
> 
> Michael Dearman <[EMAIL PROTECTED]> wrote:
> 
> > I've come close to figuring this one out buy following some of the
> > <H1>Hello $ENV{REMOTE_HOST}</H1>
> >

> 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...)

Yes, there's a 'printenv' script in the cgi-bin dir.

>From 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.

[the >'s aren't correct. Tried to reformat to make clearer and properly
acknowledge the help]

Thanks!!

That was it. Specifically - I don't have DNS set up on my home network.
REMOTE_ADDR did the trick.
And thanks for pointing out those resources. Should help with other
problems with examples in the Book.

*Saaalute*
Michael Dearman

Reply via email to