I recently migrated from PHP 5 to PHP 7. On PHP 5 I used the PECL GeoIp library for geolocation, but I don’t find that PHP extension for PHP 7. So where can I find it? Or doesn’t it exist (yet)?
Now I’m using “GeoIP (Php)”, but some IPv6 addresses are wrongly mapped to China, which afaik wasn’t the case when using PECL…
@MathiasB , I’m running a Ubuntu 16.04 server with PHP 7 and after checking the xenial repo I found out that there is a package called php-geoip.
sudo apt-get install php-geoip php7.0-dev libgeoip-dev
Reloaded apache just in case. Now I have the PECL option enabled and working. Not tested on production servers but looks like it works correclty.
Hope It helps!
I just solve this issue installing 1.1.1 from PECL (1.0.8 is the default marked in install), and PHP7 is not supported in 1.0.8, you have to install at least 1.1.1 from PECL.
To install v1.1.1 of GeoIP, run
sudo pecl install geoip-1.1.1
Just as an FYI, I installed without the php7.0-dev and it seems to be working.