How to install MongoDB to use with xampp on Windows
MongoDB is a NOSQL,schema-free and document-oriented database which is a good alternative to couchDB and MYSQL used extensively for high scalability and performance here you could find a list of website uses mongodb as there database
Step2
Check your Php version by going to http://localhost/xampp/phpinfo.php
note down the following from the below image
first the php version(here 5.3) then the php extension build (here ts,vc6)
- Foursquare
- bit.ly
- SourceForge
- Github
Today i am going to tell How to install MongoDB to use with xampp on Windows where you could play around with php
Step1
Installing MongoDB
- Download MongoDB from mongodb.org/display/DOCS/Downloads
- Extract the archive
- Open Command Prompt
- Goto mongodb\bin folder
- Type
mkdir C:\mongodb\db mongod.exe --dbpath=C:\mongodb\db
Step2
Check your Php version by going to http://localhost/xampp/phpinfo.php
note down the following from the below image
first the php version(here 5.3) then the php extension build (here ts,vc6)
- Download MongoDB driver from github.com/mongodb/mongo-php-driver/downloads
- Extract driver and copy the dll that matches your php version installed on your xampp (here mongo-1.1.4-php5.3vc6ts) and put to php/ext folder
- Open php.ini file
- Append this extension=php_mongo.dll, save php.ini file, and then restart your web server.
if every thing went fine then
- Point your browser at localhost and select your language, then phpinfo() from the left menu
- Make sure there's a Mongo section
try out this example from here http://www.php.net/manual/en/mongo.tutorial.php to test mongodb is working
hi rajesh
ReplyDeleteam using win7 and but it showing warning
PHP startup:mongo: Unable to initialize module
Module compiled with module API=10060613
PHP compiked with module API=20090626
These options need to match
So it not working in my system
am currenlty using PHP 5.3.5
Please give the solution
thanks
PHP startup:mongo: Unable to initialize module
ReplyDeleteModule compiled with module API=10060613
PHP compiked with module API=20090626
These options need to match
So it not working in my system
am currenlty using PHP 5.3.5
Please give the solution
Any reply on this same problem for me :)
Install the correct driver, looks like there was a problem with the driver you installed
ReplyDeleteI choose mongo-1.1.4.zip — All of the Windows build for the 1.1.4 release -- updated #2 it only contained php_mongo.dll which is what we need.
Thanks Katie. I had installed all the latest versions without noticing that the VC number had anything to do with the php version. Silly of me:)
ReplyDeleteYes Katie you are correct that "1.1.4 release -- updated #2" is the driver file to be downloaded. Thanks:)
DeleteThanks Rajesh your phpinfo image display helped me a lot to install the mongodb in wamp/xampp
ReplyDeleteHi..I tried all the steps that you have mentioned and still I am unable to use mongoDB in xampp...The PHPinfo does not show mongodb details...But i have followed all the steps that you have mentioned..Please help me with a solution..
ReplyDelete