问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/15131146/error-enabling-mongodb-module