REMOTE_ADDR problem in CGI mode

From: Date: Thu, 30 Nov 2000 23:05:35 +0000
Subject: REMOTE_ADDR problem in CGI mode
Groups: php.windows 
Request: Send a blank email to php-windows+get-4207@lists.php.net to get a copy of this message
I've got apache 1.3.12 running in both CGI and module modes at the same time. .php4 files are loaded as module and .php are loaded via CGI. The following code only works if the file has a .php4 extension [apache mod]: $r_hostname = gethostbyaddr($HTTP_SERVER_VARS["REMOTE_ADDR"]); print ("$r_hostname<P>\n"); If I run it on a .php file [CGI], I get the error message: Warning: Undefined index: REMOTE_ADDR in .... I used to run CGI and module mode separately [ie: I commented out certain lines in my httpd.conf file to run php ONLY as either a CGI or module] and it would work fine. But when my httpd.conf is set so that I can run both, I get the above problem. What have I broken, and how do I fix this? TIA, /vjl/

« previous php.windows (#4207) next »