Over a million developers have joined DZone.

Tutorial: Connecting PHP to MongoDB from XAMPP

· Database Zone

Build fast, scale big with MongoDB Atlas, a hosted service for the leading NoSQL database. Try it now! Brought to you in partnership with MongoDB.

Below is a 20-minute tutorial for connecting PHP to MongoDB from XAMPP in Windows 7.  From the original post:

Download the drivers. Place them in the php\ext directory.Edit php.ini. Stop/Start Apache. Verify with phpinfo(). Run test PHP script showing the create of the MongoClient connection, the use of a DB, the collection selection and demo an Insert and FindOne command. Link to supporting post - http://davecoast.com/dc_blog/how-to-mongodb-php-connect/


Now it's easier than ever to get started with MongoDB, the database that allows startups and enterprises alike to rapidly build planet-scale apps. Introducing MongoDB Atlas, the official hosted service for the database on AWS. Try it now! Brought to you in partnership with MongoDB.

Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}