On 10/7/05, Sven Simons <sven.simons@xxxxxxx> wrote: > > I've installed PHP using the windows installer > I try to open then php pages containing the following script : > <?php > echo "Current IP Address: "; > $ipx = getenv("HTTP_CLIENT_IP") ? getenv("HTTP_CLIENT_IP") : 0; > $ipx = !$ipx && getenv("HTTP_X_FORWARDED_FOR") ? > getenv("HTTP_X_FORWARDED_FOR") : 0 ; > $ipx = !$ipx && getenv("REMOTE_ADDR") ? getenv("REMOTE_ADDR") : 0 ; > echo !$ipx ? "UNKNOWN" : $ipx; > > echo "<br>"; > > echo "Server IP Address: "; > $ipx = getenv("SERVER_ADDR") ? getenv("SERVER_ADDR") : 0; > echo !$ipx ? "UNKNOWN" : $ipx; > ?> > It works and gives me a correct current IP address > > When manually installing PHP it always gives me the status UNKNOWN. > > Just use the $_SERVER[] superglobal array to grab the stuff you need. Don't use the getenv function. -Mike -- ________________________________ Michael E. Crute Software Developer SoftGroup Development Corporation Linux, because reboots are for installing hardware. "In a world without walls and fences, who needs windows and gates?"