How to install the MongoDB driver for PHP 7 on Windows 7?
MongoDB offers its own driver, with installation instructions on how to set it up, after which you'll have to use the the MongoDB Driver API, rather than the now obsolete MongoClient way of connecting. If phpinfo()
shows the mongodb extension working, then you should be able to connect to it using the updated syntax:
$client = new MongoDB\Driver\Manager("mongodb://localhost:....");
Install MongoDB driver in Cent os 7 with php7.1
You can Install mongodb manually with following commands:
First install php71w-devel
package with following command:
sudo yum install php71w-devel -y
and then you can install it manually.
$ git clone https://github.com/mongodb/mongo-php-driver.git
$ cd mongo-php-driver
$ git submodule sync && git submodule update --init
$ phpize
$ ./configure
$ make all -j 5
$ sudo make install
ref:http://php.net/manual/en/mongodb.installation.manual.php
Related Topics
Laravel: I Can't Send More Then 2 Variables from Controller to a View
Excel - Getting the Top 5 Data of a Column and Their Matching Title But Produces Duplicates
Where Clause in Insert Statement Using MySQL/Php
How to Deploy Correctly When Using Composer's Develop/Production Switch
Php: Can Curl Follow Meta Redirects
Empty String Comparison to Zero Gives Different Result in PHP 8 Than in Previous Versions
Removing Password from Rsa Private Key
How to Get Wordpress Post Featured Image Url
Any Way to Break If Statement in PHP
Fatal Error: Call to Undefined Function Oci_Connect()
Laravel Password Validation Rule
Get the Number of Pages in a PDF Document
Loading CSV into MySQL Table with PHP
How to Use an Object Method as a Callback Function
Codeigniter $This->Db->Get(), How to Return Values for a Specific Row