0

I am trying to use MongoDB with drupal 7 site. The database is hosted remotely on mongolab.com.

I have installed the MongoDB Driver on my dedicated server and it added extension = "mongo.so" to my php.ini automatically.

Now, when I try to enable MongoDB module, it gives me this error:

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

Any ideas why?

Muhammad Reda
  • 26,379
  • 14
  • 93
  • 105

1 Answers1

2

1) In your phpinfo() screen, make sure the Configuration file Path and Loaded Configuration File match the PHP file you are editing. If not, then find the correct php.ini and add the mongo.so extension.

2) In your phpinfo() screen, look at the extension_dir value and confirm that mongo.so exists in that directory. If not, find the mongo.so file and copy it to this directory.

3) Restart your web server.

4) If it's still not working, take a look at the web server & php logs for clues as to why the extension might not be loading.

Coder1
  • 13,139
  • 15
  • 59
  • 89
  • I was banging my head against the wall, nothing was helping me. I realized that php.ini file was not reflecting changes so I found out that I should restart php-fpm like `sudo systemctl restart php-7.3-fpm` that was it! – mohammad fallah.rasoulnejad Feb 07 '20 at 13:55