rlerdorf / geoip
Legacy GeoIP (v1) PHP extension wrapping MaxMind's libGeoIP C library
Package info
Language:C
Type:php-ext
Ext name:ext-geoip
pkg:composer/rlerdorf/geoip
1.4.0
2026-04-06 22:40 UTC
Requires
- php: >=7.2
README
This is the legacy (v1) GeoIP PHP extension for PHP 7.2+ and PHP 8.x.
Unless you have old code that needs this, you might be better off using GeoIP2.
Installing:
Example for Debian (apt) and PHP 8.2
apt install php8.2-dev geoip-bin geoip-database libgeoip-dev git clone https://github.com/rlerdorf/geoip.git geoip && cd geoip phpize8.2 ./configure make make test make install
To use it:
- Add line
extension=geoip.soto your (PHP 8.2)php.ini - Restart your webserver e.g.
service apache2 restart - If using FPM:
service php8.2-fpm restart