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