Torann / laravel-geoip

Determine the geographical location of website visitors based on their IP addresses.
http://lyften.com/projects/laravel-geoip
BSD 2-Clause "Simplified" License
2.07k stars 372 forks source link

Maxminddb library search tree corrupt #167

Closed RFreij closed 4 years ago

RFreij commented 4 years ago

laravel-geoip version: 1.1.0 Laravel version: 5.5

Hi,

We are currently experiencing a problem when updating the maxminddb library with the command geoip:update. When using the command the file seems to be corrupt, however when downloading the file directly from the maxmind server the file works.

We found out about this problem when we noticed content was visible that shouldn't have been visible for countries like Belgium.

We've been testing what could be wrong using a PC with Ubuntu installed and used the following command:

mmdblookup --file ./geoip.mmdb --ip 185.104.186.184

The error we got is:

Got an error from the maxminddb library: The MaxMind DB file's search tree is corrupt

edtsz commented 4 years ago

Hello, I'm getting the same problem but just in my production app, locally everything is running well.

laravel 5.8.36
laravel-geoip 1.1.0
PHP 7.3.14-6+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Feb  5 2020 16:51:32) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.14, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.14-6+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
michaelanting commented 4 years ago

Hello,

We also had this issue, it was resolved for us after we upgraded to Laravel 6.0. I'm not sure if the Laravel update itself fixed the issue. Just leaving it here as a possible solution.

edtsz commented 4 years ago

Hi guys, My problem disappeared. I just update all packages with composer update, now Laravel 5.8.37 is running.

RFreij commented 4 years ago

Like @michaelanting said it appears to be working again after updating to Laravel 6.0. @edtsz good to hear updating to the latest patch of 5.8 is working too :)

I'll close this issue for now, hope it doesn't happen again.