maxmind-db/reader
The official PHP API for reading MaxMind DB files, which store data indexed by IPv4 or IPv6 subnets. Install via Composer for the pure PHP implementation or the C extension for faster lookups.
InvalidDatabaseException.--with-maxminddb-bundled builds of the
extension now applies the same decoder limits. The extension throws an
InvalidDatabaseException when a lookup exceeds them.strlen() instead of ftell().libmaxminddb.lib or
maxminddb.lib when building the extension. The lib prefix was removed
in libmaxminddb 1.6.0, but the libmaxminddb that PHP publishes for Windows
builds is still 1.5.0, which uses the prefixed name. Pull request by
Jean-Baptiste Nahan. GitHub #231.XtOffsetOf() with offsetof(). The XtOffsetOf() alias has
been removed in PHP 8.6. Pull request by Remi Collet. GitHub #252.--with-maxminddb-bundled
to configure (or to configure.bat on Windows). This produces an
extension that does not depend on a system libmaxminddb, which is a
prerequisite for distributing precompiled builds; on Windows it also
replaces the 1.5.0 import library that PHP publishes for Windows builds.
The default is unchanged: without the flag, the extension links against a
system libmaxminddb as before. GitHub #265.conflict constraint on ext-maxminddb in composer.json is again
updated when a release is cut. The substitution that maintains it stopped
matching in April 2024, when the constraint's separator changed from a comma
to ||, so the constraint has read <1.11.1 through four releases. Users of
the C extension should note the effect of reviving it: ext-maxminddb is a
Composer platform package, so this release conflicts with an older compiled
extension and composer update will require upgrading the two together.
GitHub #266.filesize() call in the reader's constructor was removed.
Pull request by Pavel Djundik. GitHub #189.TypeError exception in the pure PHP reader when using large
databases on 32-bit PHP builds with the bcmath extension. Reported
by dodo1708. GitHub #124.gmp or bcmath to decode them.
Reported by Alejandro Celaya. GitHub #119.maxminddb extension is now buildable on Windows. Pull request
by Jan Ehrhardt. GitHub #115.maxmind-db/reader. You can use it independently.metadata method on the reader now returns a new copy of the
metadata object rather than the actual object used by the reader.is_readable() bug. Reported by Ben Roberts. GitHub
#92.getWithPrefixLen. This has been fixed. Reported by proton-ab.
GitHub #96.composer.json file now conflicts with all versions of the
maxminddb C extension less than the Composer version. This is to
reduce the chance of having an older, conflicting version of the
extension installed. You will need to upgrade the extension before
running composer update. Pull request by Benoît Burnichon. GitHub
#97.getWithPrefixLen, was added to the Reader class.
This method returns an array containing the record and the prefix
length for that record. GitHub #89.maxminddb extension now returns a string when a uint32
value is greater than LONG_MAX. Previously, the value would
overflow. This generally only affects 32-bit machines. Reported
by Remi Collet. GitHub #79.uint64 values, the maxminddb extension now returns an
integer rather than a string when the value is less than or equal
to LONG_MAX. This more closely matches the behavior of the pure
PHP reader.maxminddb extension now has the arginfo when using reflection.
PR by Remi Collet. GitHub #75.maxminddb extension now provides MINFO() function that
displays the extension version and the libmaxminddb version. PR by
Remi Collet. GitHub #74.maxminddb configure script now uses pkg-config when
available to get libmaxmindb build info. PR by Remi Collet.
GitHub #73.maxminddb extension now obeys open_basedir. If
open_basedir is set, you must store the database within the
specified directory. Placing the file outside of this directory
will result in an exception. Please test your integration before
upgrading the extension. This does not affect the pure PHP
implementation, which has always had this restriction. Reported
by Benoît Burnichon. GitHub #61.autoload.php file is provided for installations without
Composer. GitHub #56.Reader class for the maxminddb extension is no longer final.
This was change to match the behavior of the pure PHP class.
Reported and fixed by venyii. GitHub #52 & #54.ext/php_maxminddb.h. GitHub #48..gitattributes as export-ignore so
that they are not part of the Composer release. Pull request by Michele
Locati. GitHub #39.strlen were removed. This should prevent issues in situations
where the function is overloaded or otherwise broken.fread() was replaced
with the difference between the start pointer and the end pointer. This
provided a 15% speed increase.Metadata class as well as misc. documentation
cleanup.mbstring.func_overload is set.How can I help you explore Laravel packages today?