DEV Community

muneebejazz
muneebejazz

Posted on

Complete Guide to install mongdb driver for XAMPP PHP

Step 1:
Make sure that have downloaded an install the mongodb community edition if not download it from

https://www.mongodb.com/try/download/community2

Step 2:

Download the Mongodb PHP extension file from
https://pecl.php.net/package/mongodb

For Windows Users click the DLL button to download the Windows version of the extension
Make sure to download the file according to your PHP version.

Image description

Step 3:
Copy the downloaded php_mongodb.dll file to
C:\xampp\php\ext

Step 4:
Add the extension in php.ini File

method 1: open the php.ini file selected from xampp config and select php.ini

Image description

Find extension=php_

and add line
extension=php_mongodb.dll

Image description

method 2: open the php.ini file from C:\xampp\php\php.ini and follow the process from method 1.

Step 5:

create a testfile.php in folder C:\xampp\htdocs\

and add the code

<?php phpinfo(); ?>

and check if the mongodb extension is installed.

Image description

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay