Results 1 to 2 of 2

Thread: mongodb 3.2.4 + php7

  1. #1

    Default 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,

  2. #2

    Default Re: mongodb 3.2.4 + php7

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

    See here:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts