[Component] GeoIP For Yii2 (Yii2-GeoIP)

This component is use to get infomation contry or city from ip. Yii2 Module to allow for easy usage of the MaxMind Free dbs

Link: github.com/phiphi1992/Yii2-GeoIP

Very excited to see this component, as I am new to Yii2 and having basic trouble implementing it myself.

I think I got it all sorted, but it still doesn’t match the sample given in the README.

Stumped for now.




'filename' => '/usr/local/share/GeoIP/GeoIP.dat', 



Invalid database type; lookupLocation() method expects City database.




'filename' => '/usr/local/share/GeoIP/GeoLiteCity.dat',



Invalid database type; lookupCountry*() methods expect Country database.

Maxmind has changed their format recently (?) but using the dat files supplied with the component also failed.




'filename' => dirname(__DIR__) . '/components/GeoIP/GeoIP.dat', // specify filename location for the corresponding database



Invalid database type; lookupLocation() method expects City database.

Maxmind of course won’t say boo. They want me to buy the McCoy.

Looks like this needs more investigation and debugging. It did not work out of the box. I can sorta see why, but have used up my time for today.

So I leave this for now. Any suggestions appreciated, thank you.