-
Type: Task
-
Resolution: Done
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:CentOS 7, PHP 5.6.18, Apache 2.4.6
*Location*: https://docs.mongodb.org/ecosystem/drivers/php/#compatibility
*User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36
*Referrer*: https://docs.mongodb.org/ecosystem/drivers/php/
*Screen Resolution*: 1440 x 900
*repo*: docs-ecosystem
*source*: drivers/php
CentOS 7, PHP 5.6.18, Apache 2.4.6 *Location*: https://docs.mongodb.org/ecosystem/drivers/php/#compatibility *User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36 *Referrer*: https://docs.mongodb.org/ecosystem/drivers/php/ *Screen Resolution*: 1440 x 900 *repo*: docs-ecosystem *source*: drivers/php
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