• Resolved smarx80

    (@smarx80)


    Hi,

    it seems that get_ip that rely on getenv() is not working on my configuration.

    I’ve set up a workaround, adding below your test also these (same as yours, but with $_SERVER variable):

    if ( $_SERVER[ ‘HTTP_CF_CONNECTING_IP’ ] ) {
    $ipaddress = $_SERVER[ ‘HTTP_CF_CONNECTING_IP’ ];
    } elseif ( $_SERVER[ ‘HTTP_CLIENT_IP’] ) {
    $ipaddress = $_SERVER[ ‘HTTP_CLIENT_IP’ ];
    } elseif ( $_SERVER[ ‘HTTP_X_FORWARDED_FOR’] ) {
    $ipaddress = $_SERVER[ ‘HTTP_X_FORWARDED_FOR’ ];
    } elseif ( $_SERVER[ ‘HTTP_X_FORWARDED’] ) {
    $ipaddress = $_SERVER[ ‘HTTP_X_FORWARDED’ ];
    } elseif ( $_SERVER[ ‘HTTP_FORWARDED_FOR’] ) {
    $ipaddress = $_SERVER[ ‘HTTP_FORWARDED_FOR’ ];
    } elseif ( $_SERVER[ ‘HTTP_FORWARDED’ ] ) {
    $ipaddress = $_SERVER[ ‘HTTP_FORWARDED’ ];
    } elseif ( $_SERVER[ ‘REMOTE_ADDR’ ] ) {
    $ipaddress = $_SERVER[ ‘REMOTE_ADDR’ ];
    }

    I suggest you to add these ones to provide a better compatibility.

    Simone.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Alan Fuller

    (@alanfuller)

    Your suggested change would be fine for better compatability. I will incorporate that in the next release so you are safe to edit the plugin files until then.

    • This reply was modified 2 months, 3 weeks ago by Alan Fuller.
    Plugin Author Alan Fuller

    (@alanfuller)

    This is in version 1.6 now

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.