Ad

Class 'MongoClient' Not Found In CentOS

- 1 answer

PHP 5.5.22

PHP mongo driver already installed

See the phpInfo()

mongodb extension

In Terminal

$ php -i | grep 'Configuration File'
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini

$ php -i | grep mongo
mongodb
mongodb support => enabled
mongodb version => 1.1.1
mongodb stability => stable
libmongoc version => 1.3.1-dev
mongodb.debug => no value => no value

But still, get this error

MongoClient not found

Any one faced this problem before? How you solve it?

Ad

Answer

There are two mongo libraries for PHP

Check Mongo Driver the links to read the manuals they have different ways to connect.

Ad
source: stackoverflow.com
Ad