Torann / laravel-geoip

Determine the geographical location of website visitors based on their IP addresses.
http://lyften.com/projects/laravel-geoip
BSD 2-Clause "Simplified" License
2.11k stars 372 forks source link

Error when moving to production #10

Closed novakben closed 10 years ago

novakben commented 10 years ago

Hi!

Everything works localy, but when moving to production I get this error when trying to get the IP's location: The file "/var/www/laravel/app/database/maxmind/GeoLite2-City.mmdb" does not exist or is not readable.

I'm calling it like this: $location = GeoIP::getLocation();

eblanshey commented 10 years ago

Like the error says, make sure the file exists in that location and that it's readable by PHP. For example, if the PHP process is running as user "www-data", make sure that www-data has read permissions on the file.

novakben commented 10 years ago

Ok it worked, I wonder why it didnt ask for it in the local version... probably because the ip is local... so it defaults to new haven.

Thanks!

eblanshey commented 10 years ago

No worries.