The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

GeoIP update, not taking effect.

Discussion in 'General Discussion' started by jols, Jun 3, 2015.

  1. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    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.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    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.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page