GeoIP update, not taking effect.

jols

Well-Known Member
Mar 13, 2004
1,110
3
168
Hi,

GeoIP has been working fine, we can use
geoiplookup [IP] to find the country location of any IP.

However, the database is old, it currently lists IPs in China, that are actually located in Singapore.

I've updated the database on one server no problem, simply by using wget and putting the new GeoIP.dat file here:

/usr/share/GeoIP/

But now on a second server, even though I have updated to the new database and restarted apache, it still shows the one (test) IP as in China instead of Singapore.

I've worked on this one all night, and I still cant figure it out.

Does anyone know how I can clear the GeoIP cache on the server. That must be the reason why the new database is not taking effect.

Anyone?

Thanks much.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello,

Are you using the PHP PECL GeoIP plugin? If so, have you pointed the PHP "geoip.custom_directory" setting to the "/usr/share/GeoIP/" path in your php.ini file?

Thank you.
 

jols

Well-Known Member
Mar 13, 2004
1,110
3
168
Thanks cPanelMichael. I think you were on the right track.

I was finally able to determine that I was just uploading the dat file to the wrong directory. I'm not sure why the one server was different than the others in this regard, but I found that updating the dat file to the following directory, worked to do the needed updating.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
I am happy to see you were able to address the issue. Thank you for updating us with the outcome.