2

When I'm trying to install geoip ext via PECL I got this:

C:\Users\admin>pecl install geoip
No releases available for package "pear.php.net/geoip"
install failed

How to do it right?

Yekver
  • 4,985
  • 7
  • 32
  • 49

3 Answers3

4

Precompiled DLLs are available at http://windows.php.net/downloads/pecl/releases/geoip/

These DLLs cover PHP versions 5.3, 5.4 and 5.5, including threadsafe (TS) and non-threadsafe (NTS). PHP 5.3 and 5.4 are compiled against VC9 on x86 while PHP 5.5 uses VC11 for both x86 and x64. You can figure out which to use in your PHP's phpinfo output.

The dll should go in PHP's extension directory - this varies depending on the installation. Look for "extension" in phpinfo's output to tell you what directory extensions are loaded from. Finally, in the php.ini, enable it via extension=php_geoip.dll

geoip databases are available via Maxmind's site. The free ones for geolite are available at http://dev.maxmind.com/geoip/legacy/geolite/ - be sure to put the dat's in apache's bin directory.

zamnuts
  • 9,492
  • 3
  • 39
  • 46
0

PECL geoip extension for windows solve my problem.

Yekver
  • 4,985
  • 7
  • 32
  • 49
0

The Windows PHP site states:

"PECL extensions for Windows is being worked on. The interface on the pecl website will most likely be updated to offer Windows DLL download right from that website. In the meantime, some extensions can be found here."

You can find the extension under http://downloads.php.net/pierre/

Johni
  • 2,933
  • 4
  • 28
  • 47