Win7 PHP 5.6 Connection MongoDB Extension

Source: Internet
Author: User
Tags php website

Do not know why, search related content is a few years ago content, the new point is not, so they give the resource link is not to use is the content of old, and most people take the same approach, as the key point is a word with, because of their negligence, I last night Leng white busy a night, Luckily I finally found it in the morning, and now I'm going to post the process.

I am using XAMPP with PHP, version is PHP 5.6.15, the focus is your version of PHP, and XAMPP does not matter.

The first step, print your phpinfo (), look at two content


One is your PHP version, the other is thread safe, followed by the two to select the corresponding DLL file

The second step is to go to the official PHP website to download the extension file, but one thing I don't quite understand is, what's the difference between MONGO and MongoDB? Why two drive is not the same, anyway, I have both installed, the method is the same

Drive of Https://pecl.php.net/package/mongodb MongoDB

Drive of Https://pecl.php.net/package/mongo MONGO

The following only take MongoDB to do the example, the method is the same

I am a Windows operating system, so this link is only for Windows, where you can see a variety of newer versions, and then click here


Select the files to download here


pay attention to .... Here's the point .... The general idea is that x86 is 32 bit and x64 is the operating system is 64, in fact, is that you installed PHP is 64 or 32, in general, PHP is 32, as to how to view, I do not know, Big deal Two try it all over again. Based on whether your previous thread is safe to choose, then download

The third step is to put the Php_mongodb.dll in the downloaded extract file into the Ext folder in the PHP installation file

Fourth step, modify PHP.ini, add the following sentence in it

Extension=php_mongodb.dll

Then restart the xampp on the line, add Php_mongo.dll method is to the top of the second step to the fourth step to repeat the line, after the Extension=php_mongo.dll plus Extension=php_mongodb.dll And then it's done.



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.