This article will describe the process of installing MONGODB extension in Wamp environment, you can have a little reference
Linux version can refer to the previous Linux installation php MongoDB extension
Installation Environment
System environment: Windows 7 64-bit
Apache Version: 2.4.9
PHP Version: 5.5.12
MongoDB version: 3.2.6
Wamp version: Wamp 2.5 64-bit
Installing MongoDB under Windows is a little more complex than a Linux environment.
Installation steps
First, determine the PHP compiler
By looking at phpinfo () you can determine
As you can see from the above picture, compiler is VC11
Ii. Determine if PHP is a thread-safe version
By looking at phpinfo () you can determine
If enabled, the thread safety version is indicated
Third, download the corresponding PHP-MONGODB version
Based on the information obtained above, it is necessary to download and conform to Php5.5,vc11,ts (thread safety), 64-bit extension
In general, the official website information is the latest and most complete, recommended to the official website to download. The download address is: http://windows.php.net/downloads/pecl/releases/mongo/. I chose the 1.6.10 version of the
Download Php_mongo-1.6.10-5.5-ts-vc11-x64.zip back, the inside of the php-mongo.dll copied to the PHP plug-in directory, I am the machine: D:\wamp\bin\php\php5.5.12\ext
Add the Libsasl.dll path to the system environment variable
According to http://php.net/manual/en/mongo.installation.php, installing MONGO extensions relies 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 D, the location of the directory is probably D:\wamp\bin\php\php5.5.12
V. Join Extension=php_mongo.dll in PHP.ini
Extension=php_mongo.dll this line of words needs to be based on the actual situation, some are extension=php_mongodb.dll, depending on the D:\wamp\bin\php\php5.5.12\ext directory MONGO extension of the name.
Note: Wamp generally have two php.ini files, one is located in the root directory of PHP, one is Apache root directory, you need to add the Apache root directory under the php.ini.
Six, restart Wamp service
It's best to quit and then open it.
Finally, the picture above experiences the wonderful moments after installation.
After the installation is successful, view the Phpinfo layout, which will display the following content.
At this point, the Windows add PHP MONGO extension successfully ended.