mongodb 3.2.4 + php7

My php aren’t seeing mongodb. Ofcourse I’ve installed php driver for mongodb by using pecl and added to php.ini. Before executing the script the database was launched manually by typing ./mongod.

I tried to check whether php loads mongodb database. I typed php -m and mongodb showed.

In order to make some tests I used this code

$mongo = new MongoClient("mongodb://localhost:27027/");

and I’ve got** Fatal error**: Uncaught Error: Class ‘MongoClient’ not found in /home/maks/public_html/mongo.php:5 Stack trace: #0 {main} thrown in /home/maks/public_html/mongo.php on line 5

Best regards,

It looks as though your test code is missing the “require” statement for Composer.

See here: