For IP's in the US we are seeing the following error occurring (resulting in a 500 server error):
Internal Server Error
geoip_region_name_by_code(): You need to specify the country and region codes.[lib/base.php:2178] Base->error()
[lib/web/geo.php:68] geoip_region_name_by_code()
[app/pages.php:19] Web\Geo->location()
[lib/base.php:1612] Base->call()
[index.php:16] Base->run()
This happens for testing with USA IP's such as 8.8.8.8, but for European (and other) addresses it works fine.
The code to produce this is as follows:
$geo = \Web\Geo::instance();
$loc = $geo->location('8.8.8.8'); // locate specific IP
To confirm that we have the GeoIP Database I checked the version with geoip_db_avail(GEOIP_COUNTRY_EDITION) and it's as follows:
GEO-106FREE 20180102 Build 1 Copyright (c) 2018 MaxMind Inc All Rights Reserved
Do you have any ideas how we can prevent the error from occurring for US addresses?
Thanks in advance.