Jump to content
thirty bees forum

Question

Posted (edited)

In the Preferences/Geolocation we have this

"In order to use Geolocation, please download this file and extract it (using Winrar or Gzip) into the /tools/geoip/ directory. "

However maxmind no longer support this database, see here:

https://stackoverflow.com/questions/54097838/geoip-dat-gz-and-geolitecity-dat-gz-not-longer-available-getting-404-trying-to

 

Further discussion here https://blog.maxmind.com/2018/01/02/discontinuation-of-the-geolite-legacy-databases/

Edited by Mark

6 answers to this question

Recommended Posts

  • 0
Posted

I wasnt sure which issue you want this in i added it to 927. After upgrading to 1.1.0 GeoLocation is broken again.

/** 1903: * Geolocation management. 1904: * 1905: * @param Country $defaultCountry 1906: * 1907: * @return Country|false 1908: * 1909: * @since 1.0.0 1910: * 1911: * @version 1.0.0 Initial version 1912: */ 1913: protected function geolocationManagement($defaultCountry) 1914: { 1915: if (!in_array($_SERVER['SERVER_NAME'], ['localhost', '127.0.0.1'])) { 1916: /* Check if Maxmind Database exists */ 1917: if (@filemtime(_PS_GEOIP_DIR_._PS_GEOIP_CITY_FILE_)) { 1918: if (!isset($this->context->cookie->iso_code_country) || (isset($this->context->cookie->iso_code_country) && !in_array(strtoupper($this->context->cookie->iso_code_country), explode(';', Configuration::get('PS_ALLOWED_COUNTRIES'))))) { 1919: $gi = geoip_open(realpath(_PS_GEOIP_DIR_._PS_GEOIP_CITY_FILE_), GEOIP_STANDARD); 1920: $record = geoip_record_by_addr($gi, Tools::getRemoteAddr()); 1921: 1922: if (is_object($record)) { 1923: if (!in_array(strtoupper($record->country_code), explode(';', Configuration::get('PS_ALLOWED_COUNTRIES'))) && !FrontController::isInWhitelistForGeolocation()) { 1924: if (Configuration::get('PS_GEOLOCATION_BEHAVIOR') == _PS_GEOLOCATION_NO_CATALOG

This is the debug file from the red highlighted line is 1919. I double check with both a converted DB and an Old one. the system shows 500 error either way with this debug. I have to turn off GeoLocation to have the system function.

  • 0
Posted

Is this a question for me @Factor? Geolocation is quite an important function in many cases and hopefully we can get back to trusting Geolocation, but am I the guy that decides about the priority?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...