How to install MongoDB extensions under Windows

Source: Internet
Author: User
Tags install mongodb mongodb version php compiler phpinfo

Installation Environmentsystem Environment: Windows 10 64-bitApache version: 2.4.9PHP Version: 5.5.12MongoDB version: 3.2.6 wamp Version: Wamp 2.5 86-bit   Installation Stepsfirst, determine the PHP compiler and determine if PHP is a thread-safe versionby looking at phpinfo () you can determine, Wamp click on localhost, then click on the lower right corner of the phpinfo ()   Second, download the corresponding PHP-MONGODB versionbased on the information obtained earlier, you need to download an extension that complies with PHP5.5,VC11,TS (thread safety), 86-bit. In general, the official website is the latest and most comprehensive, recommended to the official website to download. Yes: http://windows.php.net/downloads/pecl/releases/mongo/. I chose 1.6.10 version of the download Php_mongo-1.6.10-5.5-ts-vc11-x86.zip back, the inside of the php-mongo.dll copy to the PHP plugin directory, I am the machine is: c:/wamp/bin/php/ Php5.5.12/ext third, add the path of Libsasl.dll in the system environment variable (note: Bloggers in the local installation skipped this step, also installed successfully)according to http://php.net/manual/en/mongo.installation.php, installing the MONGO extension requires a dependency on libsasl.dll, so add the directory to the system environment variable. This directory is typically the root directory of PHP. Under Wamp 2.5, if the Wamp installation disk is drive C, the location of the directory is c:/wamp/bin/php/php5.5.12How to add a path: Right-click My Computer--Properties--Advanced system settings--environment variables--System variables--add at the end of Pathadd; C:/wamp/bin/php/php5.5.12 can be.     Iv. Adding Extension=php_mongo.dll to the php.iniOpen with PHP php.ini in Wamp, ctrl+f fill in the search extension= add Extension=php_mongo.dll to many line extensionsExtension=php_mongo.dll This line of words need to be based on the actual situation, some are extension=php_mongodb.dll, depending on c:/wamp/bin/php/php5.5.12/ext The name of the MONGO extension in the directory. Note: Wamp generally has two php.ini files, one is located in the root directory of PHP, one is the root directory of Apache, this step is the default to modify the Apache root directory under the php.ini.

Note: When I install, phpinfo () has not shown the MONGO extension, and later found that it is because of the yellow background text above! Be sure to choose the correct version of the extension file, I myself Wamp system is 84-bit, has been downloaded into 64-bit!! Wamp system is not the same as the system of your computer! Don't make a mistake!

How to view: Open Phpinfo (), you can see

How to install MongoDB extensions under Windows

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.