Hi there,
We have a paid subscription to the GeoIP Country database. The .dat file
has been downloaded to /usr/local/share/GeoIP/GeoIP.dat per instruction.
We built a simple PHP interface to this, which acts as a wrapper to your
own PHP interface in sample.php. We tested this, it worked fine.
We plugged this into a web application on a remote server, and it worked
fine.
We then plugged the same code into another web application, and it
returns a blank country on every IP tested (three real-world).
We added lots of debugging. We did echo geoip_country_code_by_addr()
giving a confirmed real IP address, and we got nothing echoed out (bar
the IP we were ensuring was valid).
We now have no idea what could be causing it. One app works, the other
doesn't. Our interface is definitely sending your geoip_... call the
right data, yet it returns nothing.
It makes no sense at all. Looking for ideas from you whilst we test and
test again some software upgrades that include geoip as an apache module
instead.
Thanks,
James Green
|