Saturday, October 01, 2011

Php MongoDB Phonebook Example

This is a example to explain how to use MongoDb with Php. In this post I will explain how to download and start MongoDb. Next you can run the Phonebook aplication.

Download MongoDb

For this example I tested 2.0.0 version for linux

Start MongoDb

Extract the file anywhere, and in mongodb-x-x-x directory create 'data' directory. Next run:

$ ./bin/mongod --dbpath data

* 'data' is the name of directory for save data

Run Phonebook example


And extract to /var/www/ the application

Next go to http://localhost/MongoPhoneBook/