Installing PERCL GeoIP for PHP on windows XAMPP

Tamara picture Tamara · May 15, 2013 · Viewed 10.5k times · Source

I'm currently working on an application that needs some GeoIP functions, I've gotten the extension from http://windows.php.net/downloads/pecl/releases/geoip/1.0.8/ however, i'm having some difficulties installing the extension on xampp for windows. Please i need help on this...

i know how to install it on other systems:

To install geoip on debian lenny:

wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gunzip GeoLiteCity.dat.gz
sudo mkdir -v /usr/share/GeoIP
sudo mv -v GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat

sudo apt-get install php5-geoip

But i still dont know how to do in in windows XAMPP. PLEASE HELP.

Answer

Sadee picture Sadee · Jun 13, 2014
  1. Copy the relevant library pecl.php.net/package/geoip/1.1.0/windows
  2. Extract in your computer
  3. Copy php_geoip.dll to C:\xampp\php\ext [Your xampp > php > ext folder (PHP 5)]
  4. Add extension=php_geoip.dll in php.ini
  5. Restart Apache
  6. If you downloaded wrong DLL it will give you error message like: platform missmatch
  7. go to phpinfo. find geoip