MongoDb not found in ZF2 controller

Question

I have few controllers in my zf2 project which work perfectly in the browser using apache and via command line.

However, I recently installed MongoDb so I can store some data using the driver found in (http://php.net/manual/en/set.mongodb.php)

My issue is, when I try to access the driver via controller + browser, I get the following message error in my apache logs :

PHP Fatal error: Class 'MongoDb\Driver\Manager' not found. 'MongoDb\Driver\Manager' is the namespace for this Driver.

If I execute some other controllers via command line, MongoDb works correctly.

Does anyone know why is this happening? I cannot see the issue :(

Thank you


Show source
| php   | zend-framework   | zend-framework2   | mongodb   2017-09-23 11:09 1 Answers

Answers to MongoDb not found in ZF2 controller ( 1 )

  1. 2017-09-23 13:09

    I found that my php.ini was pointing to mongo.so instead of mongodb.so

    That fixed the issue http://php.net/manual/en/mongodb.installation.manual.php

    Thank you for your help

Leave a reply to - MongoDb not found in ZF2 controller

◀ Go back