Get answers quicker by searching

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

  • Ben January 2013
Unable to record down Country Open stats due to difference in getenv for ip address
  • Vote Up0Vote Down yaoquanyaoquan
    Posts: 36Sendy user
    Hey Ben,

    Found this issue on PHP fog, where by the $ip from getenv() is like this "203.117.233.23, 127.0.0.1"

    With that, the geocode function was not able to work properly. I had to remove the part after comma for it to work.
  • 3 Comments
  • Vote Up0Vote Down BenBen
    Posts: 3,484Sendy support
    Hi @yaoquan,

    Does all IPs on PHP fog look like this? With a , 127.0.0.1 appended at the back?

    Thanks.

    Ben
  • Vote Up0Vote Down BenBen
    Posts: 3,484Sendy support
    Either way, I've added the following 2 lines after line 60 in t.php.

    $ip_array = explode(',', $ip);
    if(array_key_exists(1, $ip_array)) $ip = trim($ip_array[0]);

    This will appear on the next update.

    Thanks.

    Ben
  • Vote Up0Vote Down BenBen
    Posts: 3,484Sendy support

    The latest update, version 1.1.4 has been released. The above code is included in this update.

This discussion has been closed.
All Discussions