Skip to content

Unable to record down Country Open stats due to difference in getenv for ip address

edited December 2012 in Troubleshooting
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.

Comments

  • Hi @yaoquan,

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

    Thanks.

    Ben
  • BenBen
    edited December 2012
    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
  • The latest update, version 1.1.4 has been released. The above code is included in this update.

This discussion has been closed.