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