Fall is almost here! According to The Boston Globe, it appears that the demand for pumpkin spice increases as soon as the air begins to feel crisp. Customers eagerly anticipate the arrival of their favourite products, and according to Study Finds, fall is the season most people identify with their preferred seasonal cuisine. In addition to pumpkin spice, flavours inspired by apple pie and apple cider are also available. Some pecan praline products are also available as a homage to the Thanksgiving holiday's prized pie (via Study Finds). Of course, not all seasonal foods are sweets. Many fast food restaurants provide turkey, stuffing, and mashed potatoes sandwiches, along with some cranberry sauce for good measure (so does Wawa). https://mcdvoiceo.shop https://tellthebello.shop https://krogerfeedbacka.shop https://talktowendysu.shop https://pandaguestexperienceu.shop https://wwwlowescomsurvey.shop https://dgcustomerfirstu.shop https://itellculvers.shop https://jacklistenso.shop https://biglotscomsurveyo.shop https://talktostopandshopo.shop The market for seasonal love hasn't entirely been cornered by fall, either. When it comes to nostalgic pleasures, Christmas is no slouch. While everything is peppermint-flavored around the holidays, hot chocolate also makes a grand appearance in the winter. For a satisfying cold-weather beverage, hot chocolate is difficult to top. Although it is rarely the best, egg nog has a devoted following (per Wide Open Eats). Although fall and winter foods often have superior flavours, there is one seasonal fast food that people wish they could have all year round.

Mongo DB with PHP using XAMPP in Windows – [ NGK ]

I just wanted to try mongodb with php for an idea that I had with my friend. So I just started it with basic setup example. MongoDB is cool and very simple to use. If you are using Windows Machine to setup Mongo, here is the steps.

Here is the installation steps for Windows:

  1. Install XAMPP
  2. You should have PHP 5.3 and above. Check it through (localhost/xampp/phpinfo.php)
  3. Download mongodb from their official site
  4. Extract the archive. Open command prompt and goto the bin folder inside that.
  5. Type “mkdir c:\mongodb\db”
  6. Type “mongod.exe –dbpath=C:\mongodb\db”
  7. Download windows driver for mongodb from GitHub page. Download the mongo-1.1.4.zip build that works for me
  8. Extract the archive. And find the build suitable to your computer. Copy the php_mongo.dll and paste it inside C:\xampp\php\ext folder
  9. Open php.ini file from c:\xampp\php
  10. Add “extension=php_mongo.dll” line to the file
  11. Save it and close. Restart apache after that
  12. Try this example code from php.net tutorial

Thats it!

// select a collection (analogous to a relational database’s table)
$collection = $db->pics;
// add a record
$obj = array( “title” => “RajiniKanth”, “author” => “karthi” );
$collection->insert($obj);
// add another record, with a different “shape”
$obj = array( “title” => “Trisha”, “online” => true );
$collection->insert($obj);
// find everything in the collection
$cursor = $collection->find();
// iterate through the results
foreach ($cursor as $obj) {
echo $obj[“title”] . “\n”;
}

1 thought on “Mongo DB with PHP using XAMPP in Windows

  1. Thank you. I was looking for this only. I had issues with the latest windows driver for mongo db.

Place for your comments....

This site uses Akismet to reduce spam. Learn how your comment data is processed.