Re: REMOTE_ADDR problem in CGI mode
| From: | Vince LaMonica | Date: | Thu, 30 Nov 2000 23:44:05 +0000 |
| Subject: | Re: REMOTE_ADDR problem in CGI mode | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-4209@lists.php.net to get a copy of this message | ||
On 2000-11-30, Pablo Vera stated:
Hi Pablo,
} Try using $GLOBALS:
}
} $r_hostname = gethostbyaddr($GLOBALS["REMOTE_ADDR"]);
I get the same error, "Undefined index: REMOTE_ADDR" :-(
} When running as CGI, $HTTP_SERVER_VARS only has "PHP_SELF".
What is strange though, is that I've run this in CGI mode before and it
has worked [using $HTTP_SERVER_VARS], as well as in module mode. It is
just when I run php in both modes that I have the problem.
I am developing code that has to run as both a php module and as CGI, so
I'd like to make sure I don't have to have two different versions of my
code to run for cgi and module.
/vjl/