Class 'expose client' notfound

Source: Internet
Author: User
Tags mongoclient
Environment: PHP5.6.2Apache2 install php-plugin driver {code...} I have already installed php-plugin driver, and php. ini has added extensions, but I still reported this error. How can this problem be solved? Code: {code...} error: {code...} environment:
PHP5.6.2
Apache2

Install php-mongo driver

[Jack:~ $] sudo pecl install mongopecl/mongo is already installed and is the same as the released version 1.6.14[Jack:~ $] vi /etc/php.iniextension=mongo.so[Jack:~ $] apachectl restart

I have installed php-mongo driver and added extensions for php. ini, but I still reported this error. How can this problem be solved?
Code:


  

Error:

Fatal error: Class 'MongoClient' not found in /private/var/www/index.php on line 5

Reply content:

Environment:
PHP5.6.2
Apache2

Install php-mongo driver

[Jack:~ $] sudo pecl install mongopecl/mongo is already installed and is the same as the released version 1.6.14[Jack:~ $] vi /etc/php.iniextension=mongo.so[Jack:~ $] apachectl restart

I have installed php-mongo driver and added extensions for php. ini, but I still reported this error. How can this problem be solved?
Code:


   

Error:

Fatal error: Class 'MongoClient' not found in /private/var/www/index.php on line 5

Run php-m on the command line to check whether the module is loaded.

You wrote it wrong. It should be new mongo.

You can refer to this for installation extension, which is basically the same

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.