GeoIP DB Update code is outdated
rgasch opened this issue · 1 comments
Describe the bug
The current code to download and update the GeoIP database is outdated. It seems that the provider of this data has switched from having a publically accessible database to one where you either have to be logged in or (which is the appropriate form to use for this package) use a user-specific download link.
To Reproduce
-
php artisan tracker:updategeoip
This generates the following error:php artisan tracker:updategeoip
ErrorException : file_get_contents(): Filename cannot be empty at /var/www/geotest/vendor/pragmarx/support/src/GeoIp/Updater.php:100
96| * @return bool
97| */
98| private function md5Match()
99| {100| if (! $match = md5_file($this->databaseFile) == file_get_contents($this->md5File)) {
101| $this->addMessage("MD5 is not matching for {$this->databaseFile} and {$this->md5File}.");
102|
103| return false;
104| }
Exception trace:1 file_get_contents("")
/var/www/geotest/vendor/pragmarx/support/src/GeoIp/Updater.php:1002 PragmaRX\Support\GeoIp\Updater::md5Match()
/var/www/geotest/vendor/pragmarx/support/src/GeoIp/Updater.php:59Please use the argument -v to see more details.
Expected behavior
The geo-database should be downloaded and imported. I guess this means that somewhere the user-specific DL link would have to be specified in the config file.
Pull requests are most welcome