When you access the phpMoAdmin to manage your mongo databases, sometimes you may get the following error.
“PHP cannot access MongoDB, you need to install the Mongo extension for PHP.”
This is because mongo is installed, but the mongo extension for php is not installed. You can install it using pecl.
pecl install mongo
Once it finishes, add the mongo.so file to your php.ini and restart apache.
You can find your php.ini as follows.
php -i | grep ini and check for the following line
“Loaded Configuration File => /usr/local/lib/php.ini”
Now open that file and make the changes
Add the following down to any already present extensions
Now clear the browser cache and try accessing the phpMoAdmin once again, it should work.