I have downloaded the module https://www.drupal.org/project/mongodb and moved to the "site/all/modules/contrib/" and from admin/modules here i want to enable the module but i got following error

Mongodb requires the PHP MongoDB extension to be installed. (Currently using Mongodb Not found)
I have tried following command to fix but still i am getting that error.

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
sudo apt-get update sudo apt-get install mongodb-server

sudo service mongodb start

sudo service apache2 restart

sudo service mongodb restart

After doing these things i checked the status of mongodb from terminal and i got:

start: Job is already running: mongodb
Please help how to fixed it???

Thanks in Advance

Comments

rahul_sankrit created an issue. See original summary.

rahul_sankrit’s picture

Title: Mongodb Not found with Drupal 7 » Mongodb requires the PHP MongoDB extension to be installed | Drupal 7
fgm’s picture

What you installed is the MongoDB server, which Drupal will query. However, in order to perform these queries it needs the PHP "mongo" extension http://php.net/mongo

On my Ubuntu 12.04 LTS box, this means installing the php5-mongo package, which comes with the PHP distribution. Probably the same on Debian.

Also, please do not use the very outdated RC2, but use the latest dev version instead.

If this fixes your issue, can you set it to "Fixed" (not "Closed") ?

rahul_sankrit’s picture

Thank you fgm for your time.

I am using Ubuntu 12.04 LTS and PHP Version 5.3.10-1.here i am also attaching Terminal message.

admin1@IITC-UBTU08:~$ sudo service mongodb start[sudo] password for admin1: 
start: Job is already running: mongodb
 sudo service mongodb status
mongodb start/running, process 996

I am still facing the same problem as you suggested i used both versions development as well as other release.

Now i am following your suggestion and doing some R&D (for PHP "mongo" extension http://php.net/mongo) for fixing this

MongoDB requires the PHP MongoDB extension to be installed. (Currently using Not found)

again thank you for your valuable time!!

fgm’s picture

As I told you on #3, you need to install the php5-mongo package, which is what the module calls the "MongoDB extension" (it's actually the Mongo extension). Probably nothing more than sudo apt-get install php5-mongo, possibly followed by php5enmod mongo and a sudo service php5-fpm restart if you're using PHP FPM or sudo service apache2 restart if you're using mod_php5.

rahul_sankrit’s picture

Thanks fgm for your support.

I followed the same steps, now the issue is fixed on different system (Ubuntu 14.04.4 LTS).

I think something reconfigured with my older system (Ubuntu 12.04 LTS).

thanks again!

fgm’s picture

Status: Active » Fixed

Glad to hear it's fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

kswamy’s picture

Hi,
I just noted that the extension being checked in the .install file refers to the old PHP mongo extension which is currently depreciated (http://php.net/manual/en/mongo.installation.php). Rather it should check for mongodb which is the new extension (http://php.net/manual/en/set.mongodb.php). Below is the change needed in rc2 and this change is needed in other versions too.

--if (!extension_loaded('mongo')) {
++if (!extension_loaded('mongodb')) {

Due to this even if the extension is loaded, it shows this error when enabling the module.

Thanks,
Kalaiselvan S

kswamy’s picture

Status: Closed (fixed) » Active
kswamy’s picture

I believe the entire module needs to changed to use the mongodb extension instead of the mongo extension. Correct me if I am wrong.

Thanks,
Kalaiselvan S

fgm’s picture

Status: Active » Closed (works as designed)

You are totally right: the API of the new module (and its structure) is entirely different and not compatible.

The 8.x-2.x branch is supposed to use it, but I do not see anyone ready to finance porting the module to the new driver for older (6.x, 7.x) versions, and 8.x-1.x is just too complex.

donquixote’s picture