Cannot identify a valid IP address
-
Hi,
there are servers – like mine – that do not add their IP to the environment. Therefore you get error in the metabox2 “Cannot identify a valid IP address” (and “PHP Notice: Undefined index: SERVER_ADDR” in debug.log).
class-admin-settings.php > line 298
You might want to get the IP using gethostbyname. Works like a charm ??
if ( isset( $_SERVER['SERVER_ADDR'] ) ) { $ip = $_SERVER['SERVER_ADDR']; } else { $ip = gethostbyname( $_SERVER['SERVER_NAME'] ); }
Cheers
Marc
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Cannot identify a valid IP address’ is closed to new replies.