MongoDB driver ____php with PHP installed under Windows

Source: Internet
Author: User
Tags mongodb mongodb driver phpinfo vc9


Turn from: http://www.williamsang.com/archives/25.html



1. Download MONGO PHP driver






Download Address: Http://github.com/mongodb/mongo-php-driver/downloads



Github-mongo-php-driver Determine your PHP version (the phpinfo () function can list your PHP version, see Step Five) to select the appropriate version according to thread safety (non-thread safe with the NTS typeface), If the Apache server chooses thread-safe, it is not thread-safe to run in CGI. Determine your own operating system version. (64 of the words are 64-bit operating systems, no 32-bit)



Like what:
Php_mongo-1.3.0rc3-5.4-vc9-nts-x86_64.dll said:
PHP version is 5.4
Non-thread-safe (NTS)
64-bit operating system (X86_64)
Php_mongo-1.3.0rc3-5.4-vc9.dll said:
PHP version is 5.4
Thread safe (no nts words)
32-bit operating system (64 is not clearly indicated, 32 bits) 

2. Extract to the "ext" subdirectory under the PHP installation directory



Also change the file name: Php_mongo.dll



Php-mongo-dll

  3. Modify PHP.ini



At the end of php.ini add the following content


1 Extension=php_mongo.dll


Php-ini-mongo 

4. Restart Apache (or another Web server) 

5. Verify that the installation was successful.



Open a PHP page (the contents below), search for MONGO, if the following figure appears, the installation is successful.


1 2 3 <?php phpinfo ();?>;


Phpinfo Verification MongoDB Driver Support TIPS:



If you start Apache, the warning shown in the following illustration appears. It means that your PHP driver selection is wrong and you can try other drivers (try a little less meat haha).
Official Installation Instructions: (Http://www.mongodb.org/display/DOCS/PHP+Language+Center)



Php-startup


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.