Comment on: "mongodb-ecosystem/drivers/php.txt"

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I received following error in apache error log, could you kindly advise how to proceed?

      PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mongodb.so' - /usr/lib64/php/modules/mongodb.so: undefined symbol: file_globals in Unknown on line 0

      I installed the Mongodb.so and necessary php libraries, it's working file on command line using following test code, but visit the same file on browser keep giving error(running on Apache 2.4+php 5.6), could you give me a hint?

      Fatal error: Class 'MongoDB\Driver\Manager' not found in ./vendor/mongodb/mongodb/src/Client.php on line 56

      the test code as following:

      <?php
      $filename='./vendor/autoload.php';
      require $filename;
      $client = new MongoDB\Client("mongodb://localhost:27017");
      $collection = $client->demo->beers;
      $result = $collection->insertOne( ['name' => 'Hinterland', 'brewery' => 'BrewDog'] );
      echo "Inserted with Object ID '{$result->getInsertedId()}'";
      ?>

      Reporter: michael
      E-mail: vanmichael@gmail.com

            Assignee:
            Unassigned
            Reporter:
            Docs Collector User (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: