Runtime Configuration

The behaviour of these functions is affected by settings in php.ini.

GeoIP Configure Options
Name Default Changeable Changelog
geoip.custom_directory "" PHP_INI_ALL

Here's a short explanation of the configuration directives.

geoip.custom_directory string

Empty by default, but can be set to force a different database path than the one compiled in the library.

add a note add a note

User Contributed Notes 2 notes

2 years ago
This page is unclear on exactly which MaxMind DB you need.

I found the answer here:


MaxMind may have changed their site recently to highlight a different format; if you look on it links to a mmdb format file now.
sly_one at abv dot bg
9 months ago
For me, It was needed also GeoIPCity.dat and adding extension to php.ini "" at the end of [PHP] section.

So ..
$details = geoip_record_by_name($ip_addr);


Now It works! :)
To Top