Repository navigation
v2.4.1 (Flarum 2.x)
When country lookup isn't working, the world map now tells you why, instead of always saying "not configured".
Until now the map said "not configured" whenever no visitor countries could be found, even when a country database file was set but couldn't be used. That sent admins looking for a setting they had already filled in.
If the country database file is set but can't be used, the map now names the problem and how to fix it:
- The path isn't a full path. It needs to start with a slash, such as
/home/you/geoip/GeoLite2-Country.mmdb. - The path points at a folder, not the file inside it.
- There is no file at that path, or your host doesn't let PHP open files in that folder.
- PHP can't read the file. Permissions of
644usually work. - The file is still compressed. MaxMind's download is a
.tar.gzarchive; extract it and use theGeoLite2-Country.mmdbfile inside. - The file isn't a MaxMind database.
It also tells you when the database is fine but "Country lookup via anonymized IP prefix" is turned off, which means the database is never used.
The help text for the country database setting now gives an example path, and recommends keeping the file outside your public web folder (such as public_html) so it can't be downloaded from your site. The extension's page has a new step-by-step guide to setting up visitor countries.
Thanks to Tutrix for the report and SpikeNit for the suggestion.
After updating
Run php flarum cache:clear so your forum serves the rebuilt files instead of the copies it already has cached.