maxmind / GeoIP2-php

PHP API for GeoIP2 webservice client and database reader
https://maxmind.github.io/GeoIP2-php/
Apache License 2.0
2.33k stars 276 forks source link

issue opening city-europe db #23

Closed ffrey closed 10 years ago

ffrey commented 10 years ago

We have bought licence for the GeoIP2-City-Europe database.

The code (found on http://maxmind.github.io/GeoIP2-php/) : $reader = new Reader($path.'\data\GeoIP2-City-Europe_20140909\GeoIP2-City-Europe.mmdb'); $record = $reader->city('128.101.101.101'); throws fatal error : "Uncaught exception 'BadMethodCallException' with message 'The city method cannot be used to open a GeoIP2-City-Europe database".

Please can you indicate the correct method name to use. Thx in advance

borisz commented 10 years ago

Hi, the code is correct. Unfortunately, the database has not been recognized as city database. Please use the previous API 0.7.0 or try the fixed branch bz/add-missing-city-database

oschwald commented 10 years ago

Thanks for the report. This is a bug in 0.8.0 with the continent-specific databases. We expect to release a fixed version later today.

oschwald commented 10 years ago

0.8.1 has been released with a fix for this. Thanks for reporting the issue, and I apologize for any inconvenience it may have caused.