Mongo driver is not installed

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.