maxmind-db / reader-ext
C extension for MaxMind DB Reader - provides significantly faster lookups
Package info
github.com/maxmind/MaxMind-DB-Reader-php-ext
Language:Shell
Type:php-ext
Ext name:ext-maxminddb
pkg:composer/maxmind-db/reader-ext
Requires
- php: ^7.2 || ^8.0
Replaces
- ext-maxminddb: *
README
This is the C extension for MaxMind DB Reader, providing significantly faster IP lookups compared to the pure PHP implementation.
Installation (PIE - Recommended)
pie install maxmind-db/reader-ext
Precompiled binaries for common platforms are attached to each release, so on those platforms no compiler or library headers are needed. Elsewhere PIE falls back to building the extension from source.
PIE 1.4.0 or later is required. Earlier versions do not understand a
package that offers both a precompiled binary and a source fallback, and they
do not all fail clearly about it: 1.3.8 through 1.3.13 quietly fetch an archive
that contains no C sources, so the build fails with nothing pointing at the
cause. Check with pie --version.
Prerequisites
None on the platforms with a precompiled binary — that is the point of them.
When building from source, the extension needs libmaxminddb. It can compile the copy vendored in the source archive, which is what the precompiled binaries are built from and what CI tests:
pie install maxmind-db/reader-ext --with-maxminddb-bundled
Otherwise it links the libmaxminddb installed on the system:
Ubuntu/Debian
sudo apt-get install libmaxminddb-dev
macOS
brew install libmaxminddb
Windows
See libmaxminddb installation instructions.
Documentation
See the main repository for full documentation: https://github.com/maxmind/MaxMind-DB-Reader-php
Related Packages
- maxmind-db/reader - Pure PHP implementation (no compilation needed)
Support
Please report issues at: https://github.com/maxmind/MaxMind-DB-Reader-php/issues
Copyright and License
This software is Copyright (c) 2014-2025 by MaxMind, Inc.
This is free software, licensed under the Apache License, Version 2.0.