Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
 
The only difference I've seen is that the Windows installer uses the
php5ts.dll for ISAPI filter while the manually installed php uses the
php5isapi.dll.
I know that the PHP is working (when manually installed) because this script
works :
<?php
 phpinfo();
?>
 
The only strange thing is that the phpinfo says that the ini file is located
in C:\Winnt although it is not there (when installing manually it is in
C:\PHP)
 
How can I make the IP address script working when manually installing PHP ?
Or is it really so unsafe to use the windows installer on a online server?
 
Sincerely,
 
Sven
 
 
 

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux