Install MongoDB in PHP

Source: Internet
Author: User
Tags install mongodb mongodb client mongodb server php source code

Introduction: This is a detailed page for installing MongoDB in PHP. It introduces the related knowledge, skills, experience, and some PHP source code.

Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 336872 'rolling = 'no'>

(1) It is very easy to install MongoDB. You only need to download the compressed package and unzip the running command.

(2) install MongoDB PHP Extension
Download the PHP extension http://github.com/mongodb/developer-php-driver/downloadsbased on your PHP version. The following prompt is displayed:
1. vc6 is suitable for Apache and vc9 for IIS;
2. Thread safe is suitable for running PHP modules and non-thread safe is suitable for running CGI.
Modify PHP. ini, add: Extension = php_assist.dll, and restart the web server.

PS. Check whether the configuration is successful. You can write a phpinfo () to check whether MongoDB expansion is available. The installation is successful.

(3) create a folder for data storage and start mongod. For example, if we define it in D:/MongoDB/data, we can execute it in the CMD environment.

D:

CD MongoDB

Mongod -- dbpath = D: \ MongoDB \ data

(4) Common commands:

Mongod-MongoDB Server
Mongo-MongoDB Client

Mongodump-MongoDB dump tool-for backups, snapshots, Etc ..
Mongorestore-MongoDB restore a dump
Export export-export a single collection to test (JSON, CSV)
Mongoimportjson-import a JSON file into a collection

Program Files-utility for putting and getting files from MongoDB gridf

More articles on "installing MongoDB in PHP"

Love J2EE follow Java Michael Jackson video station JSON online tools

Http://biancheng.dnbcw.info/php/336872.html pageno: 9.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.