- Notifications
You must be signed in to change notification settings - Fork211
The Official MongoDB PHP driver
License
mongodb/mongo-php-driver
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This extension is developed atop thelibmongoc andlibbson libraries. It provides a minimalAPI for core driver functionality: commands, queries, writes, connectionmanagement, and BSON serialization.
Userland PHP libraries that depend on this extension may provide higher levelAPIs, such as query builders, individual command helper methods, and GridFS.Application developers should consider using this extension in conjunction withtheMongoDB PHP library, whichimplements the same higher level APIs found in MongoDB drivers for otherlanguages.
To install this extension, you needpie installed on your system.pie is a modern tool for managing PHP extensions.
Install themongodb/mongodb-extension package from Packagist using the following command:
pie install mongodb/mongodb-extension
This will automatically download, build, and enable the MongoDB extension for your PHP installation.
Add a version constraint after the extension name to restrict can be installed:
pie install mongodb/mongodb-extension:^2.1.0
The constraint^2.1.0 will install the latest version>= 2.1.0 < 3.0.0-dev.
For more details on usingpie, see thepie documentation.
Note
Using pecl to install extensions is deprecated.
To build and install the extension:
pecl install mongodbecho"extension=mongodb.so">>`php --ini| grep"Loaded Configuration"| sed -e"s|.*:\s*||"`
The MongoDB PHP Driver followssemantic versioning for its releases.
Additional installation instructions may be found in thePHP.net documentation.
This extension is intended to be used alongside theMongoDB PHP Library, which isdistributed as themongodb/mongodb package forComposer.
Note
Integrity validation is not yet supported when installing withpie. If you require signature verification, use the manual or PECL installation methods described below.
Releases are created automatically and signed using thePHP team's GPG key. This applies tothe git tag as well as all release packages provided as part of aGitHub release. Toverify the provided packages, download the key and import it usinggpg:
gpg --import php-driver.asc
PECL packages are made available as release artifacts on GitHub, as well as onthePECL homepage. The GitHub release will alsocontain a detached signature file for the PECL package (namedmongodb-X.Y.Z.tgz.sig).
To verify the integrity of the downloaded package, run the following command:
gpg --verify mongodb-X.Y.Z.tgz.sig mongodb-X.Y.Z.tgz
Note
No verification is done when usingpecl to install the package. To ensurerelease integrity when usingpecl, download the tarball manually from theGitHub release, verify the signature, then install the package from thedownloaded tarball usingpecl install mongodb-X.Y.Z.tgz.
Windows binaries distributed through GitHub releases contain a detachedsignature for thephp_mongodb.dll file namedphp_mongodb.dll.sig. To verifythe integrity of the DLL, run the following command:
gpg --verify php_mongodb.dll.sig php_mongodb.dll.tgz
Note
Windows binaries distributed directly through PECL are not signed by MongoDBand cannot be verified. If you need to verify the integrity of the downloadedbinary, always download them from the GitHub release.
Issues pertaining to the extension should be reported in thePHPCproject in MongoDB's JIRA. Library-related issues should be reported in thePHPLIBproject.
For general questions and support requests, please use one of MongoDB'sTechnical Support channels.
If you've identified a security vulnerability in a driver or any other MongoDBproject, please report it according to the instructions inCreate a Vulnerability Report.
Development is tracked in thePHPC project in MongoDB'sJIRA. Documentation for contributing to this project may be found inCONTRIBUTING.md.
About
The Official MongoDB PHP driver
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.