MangoDB3.x cannot be used in php7

Source: Internet
Author: User
In php7, MangoDB3.x cannot be used to drum up MangoDB3.x for a day today. it was downloaded on the official website and can be connected to the database after installation.

Then I used it in the Php7 environment, so I went to the terminal.

After the download is complete, I put it in the ext folder and added the following in php. ini:
; Added php7 support for MongoDB3.x
Extension = php_mongodb.dll
Then restart, and no related MongoDB module appears after phpinfo. And
$manager = new MongoDB\Driver\Manager("mongodb://localhost:27017");

If this command cannot be used, the following Error is reported: Uncaught Error: Class 'mongodb \ Driver \ manager' not found.

Please refer to the following link for more information: https://pecl.php.net/package/mongodb####pear Package:
D: \ php \ php7> pear install PEAR
Pear/PEAR is already installed and is the same as the released version 1.10.1
Install failed
After the installation is complete, it is still not possible to restart Apache, so I would like to ask for help from my predecessors. thank you.


Reply to discussion (solution)

Phpinfo must have a module display

View other php. ini files and edit them.

Phpinfo must have a module display

View other php. ini files and edit them.


Php. ini: no problem in editing. after you specify the ext Directory, add the dll.

Phpinfo must have a module display

View other php. ini files and edit them.



To solve this problem, you have to add the php installation directory to the PATH, so that it will take a day and a half...

Setting environment variables is not green
You can use the LoadFile command in httpd. conf to load php7ts. dll.
If other supporting libraries cannot be automatically loaded, the LoadFile command can also be used for pre-loading.

Setting environment variables is not green
You can use the LoadFile command in httpd. conf to load php7ts. dll.
If other supporting libraries cannot be automatically loaded, the LoadFile command can also be used for pre-loading.



After learning, find the dll you are talking about. set it to path in one step ..

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.