Vous êtes sur la page 1sur 16

API Bigdata MYSQL HTML5 Javascript LAMP PHP CodeIgniter VB.

Net

You Are Here : Home » MongoDB » Configure MongoDB With PHP On Windows For XAMPP In 5 Simple Steps

Configure MongoDB with PHP on These Celebs Take Vacations to a

windows for XAMPP in 5 simple steps


Whole New Level!

 Abhishek Kaushik  October 8, 2013  MongoDB, PHP  8 Comments


4 Easy Tips to Get Free Money from
Your Employer!

Managed Full-Text Search These are the most adorable puppy


FAILS you'll ever watch!

These Celebs Take Vacations to a


Whole New Level!
Advertisement

Convertido de web en PDF a http://www.htmlapdf.com con el api html a pdf


ADVERTISEMENT
Today we will configure MongoDB with PHP. It is very easy to do so. For that let’s install
latest XAMPP, here I am using XAMPP -1.8 with VC9 on windows XP. These Celebs Take Vacations to
a Whole New Level!
Step I:

Install XAMPP and create a test file on htdocs with following code: 4 Easy Tips to Get Free Money
from Your Employer!
1 <?php
2 echo phpinfo();
3 ?>
These are the most adorable
Save it as phpinfo.php puppy FAILS you'll ever watch!

Now run the phpinfo.php file in browser and check for “mongo” by pressing ctrl + F. You will
definitely not get anything as MongoDB extension is not there on XAMPP right now. Also
Observe your PHP version Compiler and architecture on the info page. As mentioned on
screenshot.

Step II:

Lets download the php driver for MongoDB from following links: Follow Us On Facebook

Here OR Here
Convertido de web en PDF a http://www.htmlapdf.com con el api html a pdf
Advertisement

These Celebs Take 4 Easy Tips to Get Free These are the most
Devzone.co.in
17,864 likes
Vacations to a Whole New Money from Your adorable puppy FAILS
Level! Employer! you'll ever watch!

Like Page Share


I will prefer first one that is from Github:
https://github.com/mongodb/mongo-php-driver/downloads and download the package Be the first of your friends to like this
that best suits to your php like compare your php version, Architecture and Compiler as in
my case my php version is php 5.4 , Compiler is MSVC9 that is VC9 and architecture is x86.
So based upon this configuration I will download package #2 as marked and shown in
screenshot below.

Recommended Books

Web Design with HTML, CSS, JavaScript


and jQuery Set

Convertido de web en PDF a http://www.htmlapdf.com con el api html a pdf


Step III:

Download and extract the package on your system and it will look like below screenshot:
I will select the php_mongo-1.3.1-5.4-vc9.dll as marked in screenshot. I will rename it as
php_mongo.dll and put it in PHP folder of XAMPP.

Follow Us On Twitter

Search

Step IV:
Search

open your php.ini file and add the below line of code in it:
Find Us On Google Plus
extension=php_mongo.dll

DevZone
as shown in below screenshot.
Follow

We Proudly Support

Convertido de web en PDF a http://www.htmlapdf.com con el api html a pdf


Step V: Restart Apache and again refer Step I , run phpinfo.php file in browser and again
search for “mongo” this time you will find the
it there as extension MongoDB extension is enabled and thats it….

Hope you enjoyed the article, soon I will post some example of php and MongoDB here…

Updated for higher versions::


If above is not working for you for some reasons may be you are windows is of higher version
like windows 7 and above then you may try below:
Here couple of steps are same as above. Also I am using Windows 8 for this, and it is
configured for PHP 5.6.3 version.

A. Same as Step I above, we will do phpinfo(); again and this time we will get some other
results as per our higher windows architecture and due to other higher versions of softwares.
You will see something like as shown in below screenshot:

Convertido de web en PDF a http://www.htmlapdf.com con el api html a pdf


B. Then goto https://s3.amazonaws.com/drivers.mongodb.org/php/index.html get last
package, say for this configuration, as shown below.

C. Extract the zip, and you will find some dll files in it as shown below, so as per our
configuration in step “A” we will select the highlighted dll, as it match with our configuration
like PHP version 5.6 and visuall c++ version 11, as shown in below image.

Convertido de web en PDF a http://www.htmlapdf.com con el api html a pdf


D. Rename it to php_mongo.dll and copy it and paste it in your \xampp\php\ext folder , in
my case its C:\xampp\php\ext

E. open your php.ini file and add the below line of code in it (if doesn’t exists):
extension=php_mongo.dll , as mentioned in Step IV above.

F. Restart Apache, this time you might see some apache error as mentioned in below images:

Convertido de web en PDF a http://www.htmlapdf.com con el api html a pdf


Convertido de web en PDF a http://www.htmlapdf.com con el api html a pdf
G. To tackle this go to your \xampp\php folder, which is C:\xampp\php in my case. Copy
libsasl.dll (as shown in below image), paste it in \xampp\apache\bin ,which is
C:\xampp\apache\bin in my case.

Convertido de web en PDF a http://www.htmlapdf.com con el api html a pdf


Convertido de web en PDF a http://www.htmlapdf.com con el api html a pdf
H. Now restart Apache again, and you are there.

F. On Success, repeat Step “A” again and search for “mongo”, this time you will find mongo
module enabled as shown below.

Convertido de web en PDF a http://www.htmlapdf.com con el api html a pdf


Here are some references sites:

http://docs.mongodb.org/ecosystem/drivers/php/

http://php.net/manual/en/book.mongo.php

AdChoices Free Excel Templates Install Windows 8 Setup and Install

Recommended Books:

Cracking the Coding Interview: 1… Python Tricks: A Buffet of Aweso …

Convertido de web en PDF a http://www.htmlapdf.com con el api html a pdf


Blockchain: Bitcoin, Ethereum, … Java: Programming Basics for A…

Excel - 51 Awesome Macros: Sa… JAVA and OOPS for beginners-P …

Coding for Beginners: Learn Com… Objective Computer Awareness

Convertido de web en PDF a http://www.htmlapdf.com con el api html a pdf


Let Us C Test Your C Skills

 MongoDB, PHP and MongoDB

Related Posts

MongoDB A Beginner’s Guide Select… Insert.. in MongoDB

Convertido de web en PDF a http://www.htmlapdf.com con el api html a pdf


« CodeIgniter Free Ready to Use Admin Panel with FourSquare API integration with PHP website in
Twitter Bootstrap 3 20 mins »

Recent Posts Popular Post Related Posts

Make nice Date Time picker CodeIgniter Free Ready to Use Allow or Block IP/IP range or
using bootstrap & Jquery Admin Panel with Twitter country from accessing
October 22, 2017 Bootstrap 3 website using .htaccess
Convertido de web en PDF a http://www.htmlapdf.com con el api html a pdf
AngularJs Simple Example: Prevent SQL injection in
Create your Geocoder or
Post Data to PHP page Codeigniter (CI)
Reverse geocoder in PHP Dynamic base_url in
February 11, 2017 Add Remove rows in table
Codeigniter
dynamically using jquery
Htaccess code to remove
MySQL RegEx function
Configure MongoDB with PHP index.php from url in
September 5, 2016 on windows for XAMPP in 5 CodeIgniter
How to highlight record in the simple steps CodeIgniter Free Ready to Use
Admin Panel with Twitter
List view July 29, 2016 CodeIgniter Free Admin Panel
Bootstrap 3
with Twitter Bootstrap 3 -
How to Display data from CodeIgniter Free Admin Panel
Version2
MySQL to Crystal Report July with Twitter Bootstrap 3 -
Upload File in PHP using Version2
21, 2016
Jquery AJAX Codeigniter - check whether
How to create MySQL Dump user already exists in database
Export MySql data into Excel
File using VB.Net July 21, 2016 using Jquery and AJAX.
or CSV format
custom validation in
How to Display Selected Data FourSquare API integration codeigniter for username using
from list view to textbox July with PHP website in 20 mins callback function
20, 2016 Connecting multiple databases
Remember Me functionality on
in Codeigniter
SignIn/Login form using
How to Connect Combo Box HTML5 & jquery
with MySQL Database July 20,
2016 Htaccess code to remove
index.php from url in
How to Store Regional CodeIgniter
Language in Database July 13,
2016
How to Generate Customer Id
in VB.Net July 12, 2016

Copyright © 2018. devzone.co.in MYSQL JQUERY CodeIgniter PHP Htaccess Javascript HTML5
AngularJs MongoDB Contact Us Programming Wallpapers Jobs
Write For
US

Convertido de web en PDF a http://www.htmlapdf.com con el api html a pdf

Vous aimerez peut-être aussi