/mongo-php

A simple app with PHP at front end and MongoDB at Backend.

Primary LanguagePHP

Basic PHP and Mongodb connection files

What the does collection of files do?

  • Connect with your MongoDB database using PHP.
  • Can able to connect local or remote database by just commenting and un-commenting a single line
  • Easily maintainable connection file to change any source
  • Sample JSON file for to import MongoDB data How to install MongoDB

How to add MongoDB Drivers at Apache ?

For Windows

Download the correct driver for your environment from http://github.com/mongodb/mongo-php-driver/downloads. Thread safe is for running PHP as an Apache module (typical installation), non-thread safe is for CGI Unzip and add the php_mongo.dll file to your PHP extensions directory (usually the "ext" folder in your PHP installation.)

How to configure PHP.INI file ?

Add to your php.ini:

  • extension=php_mongo.dll
  • Restart your web server (Apache, IIS, etc.) for the change to take effect

How to access the Front end?

  • Download or clone the enitire source at your local and move the entire folder to your web root.
  • Import the data from file data.json in to your collection.
  • Update the file connections.php as per your DB specifications.
  • Point your browser at index.php to view the front end (for example: http://localhost/mongo-php/index.php

What needs to be done?

  • Inserting and retrieving binary data like MP3 & Images.
  • Pagination to limit records par page.