Fix for <font color=blue>Warning:Address is not a valid IPv4 or IPv6 address</fo

Posted on Thursday, December 26, 2002 @ 09:13:57 UTC in Guest Book
by gcf

With the release of KISGB v4.2.0, I added a function to translate the visitor's IP address to a host name, as some have requested. However, some sites, when using a proxy, will mask the IP, which causes the gethostbyaddr() function to return a value that php flags as an invalid IP format. If you have error_reporting set to E__ERROR or display_errors = Off, then the message is suppressed to the log and is not an issue. To circumvent the 'Warning' that PHP throws, please read on.Here is a quick 'work-around' if you do not have access to your php.ini file: In functions.php, on line 30, is this line: $hosti = gethostbyaddr($czysty); Modify it to read: $hosti = @gethostbyaddr($czysty); That will/should suppress all errors for that function call.
 
 
click Related        click Share
 
News ©

Site Info

Last SeenLast Seen
  • kguske
  • neralex
Server TrafficServer Traffic
  • Total: 483,528,452
  • Today: 4,494
Server InfoServer Info
  • May 15, 2024
  • 02:34 am UTC