geoap_country_name_by_name():所需数据库在C:examplep/apache/bin/g


geoip_country_name_by_name(): Required database not available at C:/xampp/apache/bin/GeoIP.dat

你知道为什么会发生这种情况吗?

A PHP Error was encountered
Severity: Warning
Message: geoip_country_name_by_name(): Required database not available at C:/xampp/apache/bin/GeoIP.dat.

我只是安装了GeoIP

感谢您的预付款。

您需要下载GeoIP数据库并将其移动到错误中引用的路径。在此处下载:http://dev.maxmind.com/geoip/legacy/install/country/

如果它可以帮助:我有同样的问题,但只是使用PHP CLI,我添加以强制lib目录设置来修复此警告。这很奇怪,因为Apache的路径没有设置,而且工作正常:

/etc/php/7.0/mods available/geop.ini:

[geopip]
geoip.custom_directory = /usr/share/GeoIP