about 9 years ago
The MongoDB is built to work with your current web server, but not PHP. To communicate PHP with MongoDB server you need to install PHP-MongoDB driver. The PHP-MongoDB driver is a PHP extension library. The presently maintained driver for the MongoDB PHP extension on the market from PECL.
To install driver library follow the below URL
http://docs.php.net/manual/en/mongodb.tutorial.install.php
If you use Linux install it easily via:
After installing driver you need to update your php.ini file with below option.
Restart your web server and verify via command line:
Making connection with MongoDB in PHP
To make connection with MongoDB using PHP you need to specify database name. If database is not exist then mongoDB will create anew database by itself.
0 Comment(s)