Www.william amsang.comarchives25.html 1. download the PHP driver for mongo: github. commongodbmongo-php-driverdownloadsgithub-mongo-php-driver determine if your PHP version (phpinfo () function can list your php version. See Step 5 for thread-safe selection.
Http://www.williamsang.com/archives/25.html 1. download mongo's PHP driver: http://github.com/mongodb/mongo-php-driver/downloads github-mongo-php-driver determine your PHP version (phpinfo () function can list your php version, see step 5) depending on whether thread security is selected
Http://www.williamsang.com/archives/25.html
1. Download the PHP driver of mongo.
: Http://github.com/mongodb/mongo-php-driver/downloads
Github-mongo-php-driver
- Determine Your PHP version (phpinfo () function can list your php version, see step 5)
- Select the corresponding version based on whether the thread is secure (not thread safe). If the apache server chooses thread security, running in CGI Mode is non-thread-safe ).
- Determine your operating system version. (64-bit OS, 32-bit OS)
For example:
Php_mongo-1.3.0RC3-5.4-vc9-nts-x86_64.dll representation:
The PHP version is 5.4.
Non-thread-safe (NT)
64-bit operating system (x86_64)
Php_mongo-1.3.0RC3-5.4-vc9.dll representation:
The PHP version is 5.4.
Thread-safe (without the word "NT)
32-bit operating system (32-bit without explicit representation)
2. decompress the package to the "ext" subdirectory under the PHP installation directory.
At the same time, change the file name to php_cmd.dll.
Php-mongo-dll
3. Modify php. ini
Add the following content at the end of php. ini:
1 |
extension=php_mongo.dll
|
Php-ini-mongo
4. Restart apache (or other web servers). 5. Verify that the installation is successful.
Open a PHP webpage (which contains the following content) and search for mongo. If it appears, the installation is successful.
Phpinfo verifies MongoDB Driver Support
TIPS:
If you start apache, the Warning is displayed. It indicates that your PHP driver is incorrect. You can try other drivers ).
Official installation instructions (http://www.mongodb.org/display/DOCS/PHP+Language+Center)
Php-startup