Mongo driver is not installed

Hi, I still have the same problem. I receive the following message with a 500 error when doing a simple get request:

“Failed to launch service “[name]”: Mongo driver is not installed.”,

I’m using a DreamFactory installation on a local VM (Ubuntu) which is working fine but I can’t connect to the MongoDB instance on the same VM. Some points:

  1. I can connect to MongoDB from RoboMongo and MongoChef.
  2. I’ve tried every permutation possible with the connection string.
  3. I’ve tried both the old and new DreamFactory admin interfaces.

I’ve only just heard of DreamFactory and thought I’d give it a whirl and was pleased I managed to set things up fairly easily. But now I’m stuck and I’m not sure what else to try. Any help appreciated. Thanks, Matt :slight_smile:

I have moved this post to a new topic, since the thread it was posted in was for an entirely different error message.

Did you follow the Ubuntu installation instructions carefully?

Note near the beginning the two additional packages that must be installed for MongoDB support: php-pear and php5-dev.

$ sudo apt-get install php-pear php5-dev

Then, later on in the install guide under the heading Configuring MongoDB Support,

$ sudo pecl install mongo

You should restart Apache after confirming you’ve followed these steps, and try again.

I’ve tried all that. Several times. Tried reinstalling. Same result.

I followed the steps exactly as above, and was able to connect to a MongoDB without issue. I have outlined the steps in detail in case you’re unfamiliar and simply missed a step.

After running sudo pecl install mongo the terminal output informs you where your new extension has been placed for you to use. Mine said:

Build process completed successfully
Installing '/usr/lib/php5/20121212/mongo.so'
install ok: channel://pecl.php.net/mongo-1.6.9
configuration option "php_ini" is not set to php.ini location
You should add "extension=mongo.so" to php.ini

So I copied mongo.so to my extensions directory, which in my case is /usr/lib/php5/ext/

$ sudo cp /usr/lib/php5/20121212/mongo.so /usr/lib/php5/ext/

Then I added the value extension=mongo.so to php.ini as instructed at the end of the install.

$ sudo nano /etc/php5/apache2/php.ini
...(and so on)...

After restarting Apache, my connection to a MongoDB went off without a hitch.

So please confirm you have followed the instructions posted in the terminal after your successful installation of mongo and let me know what error(s) you encountered. It’s possible you enabled your new mongo.so extension in your php cli’s ini and not in your apache2’s php ini. To confirm this, call /rest/system/environment and see 1) where it says your php.ini is located, 2) where it says your php extensions directory is located, and 3) whether or not it lists mongo as an enabled module.