Geoip стоит. Базы залиты /usr/share/GeoIP
phpinfo показывает/etc/php.d/geoip.ini
geoip extension version 1.0.8
geoip library version 1004005
geoip.custom_directory no value no value
В php.ini прописана строка
extension=geoip.so
Nginx собран вместе с geo модулем, nginx -V это подтверждает.
В nginx.conf прописано
# GeoIP
geoip_country /usr/share/GeoIP/GeoIP.dat; # the country IP database
geoip_city /usr/share/GeoIP/GeoLiteCity.dat; # the city IP database
### SET FASTCGI Variables ###
fastcgi_param GEOIP_CITY_COUNTRY_CODE $geoip_city_country_code;
fastcgi_param GEOIP_CITY_COUNTRY_CODE3 $geoip_city_country_code3;
fastcgi_param GEOIP_CITY_COUNTRY_NAME $geoip_city_country_name;
fastcgi_param GEOIP_REGION $geoip_region;
fastcgi_param GEOIP_CITY $geoip_city;
fastcgi_param GEOIP_POSTAL_CODE $geoip_postal_code;
fastcgi_param GEOIP_CITY_CONTINENT_CODE $geoip_city_continent_code;
fastcgi_param GEOIP_LATITUDE $geoip_latitude;
fastcgi_param GEOIP_LONGITUDE $geoip_longitude;
В fastcgi_params тоже
# For GeoIP
fastcgi_param GEOIP_COUNTRY_CODE $geoip_country_code;
fastcgi_param GEOIP_COUNTRY_NAME $geoip_country_name;
fastcgi_param GEOIP_REGION $geoip_region;
fastcgi_param GEOIP_CITY $geoip_city;
fastcgi_param GEOIP_POSTAL_CODE $geoip_postal_code;
fastcgi_param GEOIP_CITY_CONTINENT_CODE $geoip_city_continent_code;
fastcgi_param GEOIP_LATITUDE $geoip_latitude;
fastcgi_param GEOIP_LONGITUDE $geoip_longitude;
php -m | grep geoip
PHP Warning: Module 'geoip' already loaded in Unknown on line 0
geoip
А в тестовом файле не определяет даже страну.