ClassMongonotfound-php Tutorial

Source: Internet
Author: User
Tags vc9
ClassMongonotfound I use xampp, and added the corresponding extension and php_assist.dll under the php. ini and \ ext directories.
Mongo is successfully installed and started. However, when you write a php program in zend, $ mongodb = new Mongo () will display the problematic class Mongo not found, I thought it was my php_cmd_drive that was not successfully installed, but I don't know how to solve it. I found a lot of tutorials on the Internet.

In addition, I used a Mysql database and later changed the original program to be connected to the mongodb database.


Reply to discussion (solution)

Check whether your mongo. dll version is consistent with your php version.

Mongo_dll extension address

Check whether your mongo. dll version is consistent with your php version.

Mongo_dll extension address


I use php is 5.2.0, php_cmd.dll version is php_mongo-1.5.4-5.2-vc9.dll this, can you?

Check whether your mongo. dll version is consistent with your php version.

Mongo_dll extension address


The php version is 5.5.9.

If you are not writing it in zend, can you?

If you are not writing it in zend, can you?


Well, I have never tried it. do you mean to write it in notepad?

If you are not writing it in zend, can you?


But I want to use zend framwork, and I am using the mvc mode. I will not use the framework with notepad.

Isn't it because you have to write a few words to prove whether you can work?
So difficult?


Print the phpinfo information to see if the mongodb class library is loaded.


Print the phpinfo information to see if the mongodb class library is loaded.


No ....

I have installed mongodb and can start it in the command prompt, but I am not sure about the driver...

No, the installation is not successful!

No, the installation is not successful!


I have done the following work. can you help me see what went wrong? Thank you very much.
1. download mongodb 2.6.3 from the official website. The installation is successful. you can start the operation at the command prompt.
2. download php_mongo.dll 1.5.4-vc9, copy it to \ xmapp \ php \ ext, modify the php. ini file, and add extension = php_mongo.dll.
3. download the mongo-php-driver-master file from GitHub and copy it to mongodb \ bin.
4. then I am in the php program, use Mongo; $ m = new Mongo ();
The error is class Mongo not found.

Thank you!


No, the installation is not successful!


I have done the following work. can you help me see what went wrong? Thank you very much.
1. download mongodb 2.6.3 from the official website. The installation is successful. you can start the operation at the command prompt.
2. download php_mongo.dll 1.5.4-vc9, copy it to \ xmapp \ php \ ext, modify the php. ini file, and add extension = php_mongo.dll.
3. download the mongo-php-driver-master file from GitHub and copy it to mongodb \ bin.
4. then I am in the php program, use Mongo; $ m = new Mongo ();
The error is class Mongo not found.

Thank you!


Http://www.fkblog.org/blog569

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.