- It Support Development ): Install Mongodb Driver For Php Onclick
- It Support Development ): Install Mongodb Driver For Php On Iis
Join GitHub today
Create a thread on Plesk UserVoice to vote for including MongoDB driver into Plesk PHP. Manual extension installation: Warning: If /tmp is mounted with no-exec option, PECL will be unable to install modules.
- Manually Installing the MongoDB PHP Driver. For driver developers and people interested in the latest bugfixes, you can compile the driver from the latest source code on » Github.Run the following commands to clone and build the project.
- MongoDB PHP Driver. 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.
- Will I be able to connect to this database using php's php_mongo.dll driver? If so, could you please provide some sample code as I was not able to get it in any forum? Php mongodb drivers.
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
It Support Development ): Install Mongodb Driver For Php Onclick
Sign upHave a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
commented Oct 1, 2016
Version Steps to reproduce the bug
Expected behaviour Actual behaviour There is a new driver, this package is called Additional information |
commented Oct 1, 2016
Hi @limikael, Learning Locker does not support PHP 7, the compatibility goes way beyond just the Mongo driver. And would require an entire rewrite to the underlying application. If you wish to contribute to a new version, then please consider forking the project and submitting pull requests, but as it stands there is no development plan to take the current version of Learning Locker into PHP7. |
commented Oct 1, 2016
I see. Thanks anyway! |
commented Jan 9, 2017
It Support Development ): Install Mongodb Driver For Php On Iis
I am curious what is not working in PHP7. We are running PHP7 in our dev environment and learning locker seems to be running fine. Is there a list somewhere of items to be worked on? |
commented Jan 10, 2017
Hey @andrewdisney, I'm curious.... Apart from a bit of change in syntax between versions (I believe changes to how Exceptions are handled are a problem moving between 5 and 7) the main problem is the Mongo driver compatbility: https://docs.mongodb.com/ecosystem/drivers/driver-compatibility-reference/#reference-compatibility-mongodb-php Learning Locker uses the old PHP Mongo driver, which as far as I know has no compatibility with PHP 7. Can you confirm you are running vanilla Learning Locker on PHP 7 using this driver? |
commented Jan 10, 2017
That's what I wrote in the initial bug, that the problem was the mongo driver. However, you said at that point @ht2 that the main problem was actually not the driver. You said 'Learning Locker does not support PHP 7, the compatibility goes way beyond just the Mongo driver. And would require an entire rewrite to the underlying application'. So what is the problem, is it the driver or something else? |
commented Jan 10, 2017
I said it goes beyond just the Mongo driver... Laravel 4.2 does not work with PHP 7 (hence my mention of a rewrite to the underlying application) but to be honest we have not used any resources attempting to check that, but please feel free. Here is a potential useful resource as to blockers you might hit: https://laracasts.com/discuss/channels/laravel/laravel-42-and-php-7. I'd suggest a good first step however would be to rewrite the repositories to use the newer Mongo driver (which is compatible with both PHP 5.x and 7). That could lead onto an update to the core application to work with PHP 7 as well. |
commented Jan 10, 2017 • edited
edited
Looking here: laravel/framework#11329 it seems that the newest version of 4.2 (4.2.20) has PHP 7 support. Is it possible that the old Mongo driver has also been (unofficially) updated for PHP 7 support too? |
commented Jan 10, 2017
Ok I see... I'm not sure if I will have time to hack on this since we actually decided to create our own LRS and use that instead... It is called wp-xapi-lrs and comes as a WordPress plugin, which makes it really convenient to use and install if you are using WordPress. If you are not using WordPress, most of it is implemented as a library which can be used without WordPress. The functionality is kind of limited at the moment, but at least it works to store statements and do basic queries. We would love some feedback @andrewdisney, so if you want, check it out! |
commented Jan 10, 2017 • edited
edited
No problem - it might be something we look at eventually. It seems that this package (https://packagist.org/packages/mongodb/mongodb) 'implements an API similar to that of the legacy PHP driver' over the top of the new driver, so it could be that by using that package, as well as ensuring v4.2.20 and removing the composer dependency to |
commented Jan 10, 2017
We did have to add an adapter library the one we used was: So we added 'alcaeus/mongo-php-adapter': '^1.0' to our composer.json ran composer and the site seems to work fine. We are still testing though. We don't plan to roll out to our production environment for a few weeks maybe months if there are still compatibility issues. We have other applications thought that require PHP 7. So that is why I was asking if there was some way we could help with anything not working in PHP 7. Just let us know. |
Will I be able to connect to this database using php's php_mongo.dll driver?
If so, could you please provide some sample code as I was not able to get it in any forum?
NullUserException3 Answers
MongoDB requires its own driver.
In your case, the PHP driver is located here:http://php.net/manual/en/book.mongo.php
The instructions for installing it are on that page. There is also some sample code.
Gates VPGates VPI think that PDO is only for relational databases. There's no PDO driver for mongodb.
There is list of databases which you can use with PDO driver: http://php.net/manual/en/pdo.drivers.php MongoDb is not among them.