New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow using and auto-updating dbip databases and default to db-ip.com lite in the UI #15319
Conversation
…RL is used and download DB IP database to special file so users will know they are not using a maxmind db.
@mattab could you maybe get in touch with DB-IP, to get access to their paid databases? maybe also the one including ISP data? Would be good if we could test those as well. |
BTW haven't looked at the code but do we want to auto update the URL for people using the free maxmind DB? |
guess it would make sense to do that in an update script |
Looks like those are for the CSV files, the mmdb files are smaller. Though they still seem to be quite large (~350mb for city db). The download might take a while but for once a month it should be ok? EDIT: I'm also not sure if that's gzipped or not. |
Updated the PR |
FYI @diosmosis our affiliate link for db-ip.com is https://db-ip.com/?refid=mtm or especially appending |
…pe of database is going to be downloaded, add support for other db-ip DBs, use enterprise geoip db for ISP detection if present, add db-ip referrer query param.
BTW: Not sure if important... once it failed for me and then I got this notice:
|
@tsteur should be fixed, let me know if you still get it |
{ | ||
static $result = null; | ||
if (is_null($result)) { | ||
$expected = array(self::COUNTRY_CODE_KEY => 'FR', | ||
self::REGION_CODE_KEY => 'BFC', | ||
self::REGION_CODE_KEY => 'BFC', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The DB-IP Lite database returns no region for this IP, so the provider is reported as broken.
In relation to #15317 we maybe shouldn't use only one IP to check if the results are ok. Maybe we could have one IP per continent and go through the list until one matches exactly? Any idea where to get some IPs with static results?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or we might use different ips/results depending on the provider / database type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about using the test database we include for system tests? Could we load that so we can control the IP/location? I started on supporting multiple ip addresses, but we'd have to have quite a few and they might change...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that wouldn't work for server modules... though it looks like servermodule overrides isWorking(). If we move that logic to the Php class it might work I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'm going to make the check less strict and just check that there's at least some data in the provider. Users can always see their own IP geolocated to check for accuracy.
…her priority files so the new downloaded one will be used, and rename some translations.
@diosmosis @sgiehl As soon as this is merged we'll release another beta for testing, looking forward to getting it merged today or tomorrow 🚀 |
refs #15308