mongo-php-driver | The Official MongoDB PHP driver | Database library

 by   mongodb PHP Version: 1.15.3 License: Apache-2.0

kandi X-RAY | mongo-php-driver Summary

kandi X-RAY | mongo-php-driver Summary

mongo-php-driver is a PHP library typically used in Database, MongoDB applications. mongo-php-driver has no vulnerabilities, it has a Permissive License and it has medium support. However mongo-php-driver has 2 bugs. You can download it from GitHub.

This extension is developed atop the libmongoc and libbson libraries. It provides a minimal API for core driver functionality: commands, queries, writes, connection management, and BSON serialization. Userland PHP libraries that depend on this extension may provide higher level APIs, such as query builders, individual command helper methods, and GridFS. Application developers should consider using this extension in conjunction with the MongoDB PHP library, which implements the same higher level APIs found in MongoDB drivers for other languages.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              mongo-php-driver has a medium active ecosystem.
              It has 814 star(s) with 193 fork(s). There are 71 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 2 open issues and 386 have been closed. On average issues are closed in 39 days. There are 4 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of mongo-php-driver is 1.15.3

            kandi-Quality Quality

              mongo-php-driver has 2 bugs (0 blocker, 0 critical, 2 major, 0 minor) and 64 code smells.

            kandi-Security Security

              mongo-php-driver has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              mongo-php-driver code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              mongo-php-driver is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              mongo-php-driver releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              mongo-php-driver saves you 10558 person hours of effort in developing the same functionality from scratch.
              It has 21445 lines of code, 129 functions and 12 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of mongo-php-driver
            Get all kandi verified functions for this library.

            mongo-php-driver Key Features

            No Key Features are available at this moment for mongo-php-driver.

            mongo-php-driver Examples and Code Snippets

            No Code Snippets are available at this moment for mongo-php-driver.

            Community Discussions

            QUESTION

            Unrecognized pipeline stage name: '$unwind'
            Asked 2018-Nov-02 at 08:20

            I am trying to do an aggregation using this array:

            ...

            ANSWER

            Answered 2018-Nov-02 at 08:20

            The problem was on my side. Even though the code was correct, there were a series of invisible UTF8 chars in the array keys or values that the driver was taking into account. Opening that file with VIM allowed me to see those characters and removing them worked. https://jira.mongodb.org/browse/PHPLIB-396

            Source https://stackoverflow.com/questions/53099673

            QUESTION

            Call to undefined method MongoDB\Driver\Server::executeReadCommand()
            Asked 2018-Feb-15 at 13:08

            Our application is running on a (very) old MongoDB 2.4 cluster - for now, it's not possible to upgrade it to newer versions.

            We were working on upgrading our application from PHP 5.6 to PHP7, everything was going fine until the version 1.4.0 of the mongodb driver deprecated MongoDB 2.4 support.

            Since we need to support 2.4, I tried to rollback the driver version to 1.3.0 and 1.3.2 and both of them are throwing this error:

            Call to undefined method MongoDB\Driver\Server::executeReadCommand()

            This executeReadCommand() seems to be something from 1.4.0, but how can that be if I'm using the version 1.3.0? Am I missing something?

            PHP Configuration:

            ...

            ANSWER

            Answered 2018-Feb-15 at 13:08

            Well, of course, there's something missing!

            Right after posting this I noticed that I completely forgot to declare the version of mongodb/mongodb inside composer.json, so composer was downloading always the latest version of the library, which is 1.3.0.

            mongodb/mongodb also deprecated support to 2.4 in their 1.3.0 release.

            I was able to fix the issue by locking the version of mongodb\mongodb to 1.2.0 in composer.json:

            "mongodb/mongodb": "1.2.0"

            Hope this helps someone that might be facing the same issue.

            Cheers

            Source https://stackoverflow.com/questions/48807940

            QUESTION

            How to have eclipse resolve php classes in MongoDB\BSON namespace?
            Asked 2017-Sep-04 at 18:30

            After many comes and goes I managed to install the MongoDB Driver for PHP 5.6 and made it work on OSX El Capitan. (The way it worked was using Homebrew)

            To start working on a project I created the folder for the project and using Composer installed the required packages I needed. Between theese packages I required mongodb/mongodb which is the recomended mongo php library to use by the php Manual on line and in the driver github page.

            The problem I found is that Eclipse is resolving the classes in the \MongoDB\ namespace but not in the \MongoDB\BSON\ namespace. If I check what Composer installed in the vendor folder I am able to see that the \MongoDB\BSON\ classes in fact are missing. On the other hand if I run the program in the PHP included webserver, it executes as expected.

            So my question is how can do or what am I missing for Eclipse to find the missing classes. Are they defined somewhere else?

            If this is not possible because they are compiled into a binary library and I have no way to resolve them, Is there any way to have Eclipse not showing these particular classes as mistakes?

            Example of class that runs ok in the webserver, but is highlighted as an error in Eclipse:

            ...

            ANSWER

            Answered 2017-Sep-04 at 18:30

            Reading this post and not finding anything newer on the subject I arrived to the conclusion that developers of the driver don't provide the php sources and leave it to the IDE developers to provide STUBs for the different fuctions of the driver in a way the IDE can recognize the functions and provide syntax checking and documentations popups.

            Following this question, I finally ended up finding a JetBrains GitHub where there are many different stubs for PHPStrom, this one among them.

            So I copied the file and added it to my project as part of the sources. And that solved my problem.

            Source https://stackoverflow.com/questions/45316371

            QUESTION

            MongoDB PHP driver loaded but class can't be found
            Asked 2017-Jun-19 at 12:24

            I'm trying to set up a PHP 7.1.6.1 installation with the Mongo driver for PHP. (v1.2.9) However the Mongo class isn't loaded although phpinfo() tells me that the mongo extension is loaded.

            Here's what I've done:

            ...

            ANSWER

            Answered 2017-Jun-19 at 12:24

            https://github.com/mongodb/mongo-php-driver says:

            Please note that the new HHVM and PHP drivers implement a different API from the legacy driver at http://pecl.php.net/package/mongo; therefore existing libraries that use the legacy driver (e.g. Doctrine MongoDB's ODM) will not work with the new drivers.

            The list of classes is at http://docs.php.net/manual/en/set.mongodb.php - "Mongo" and "MongoClient" are not among them.

            Source https://stackoverflow.com/questions/44630412

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install mongo-php-driver

            To build and install the driver:. Additional installation instructions may be found in the PHP.net documentation. This extension is intended to be used alongside the MongoDB PHP Library, which is distributed as the mongodb/mongodb package for for Composer.

            Support

            https://php.net/manual/en/set.mongodb.phphttps://docs.mongodb.com/ecosystem/drivers/php/
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/mongodb/mongo-php-driver.git

          • CLI

            gh repo clone mongodb/mongo-php-driver

          • sshUrl

            git@github.com:mongodb/mongo-php-driver.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link