PHP 7.4.8 Released!

Installing the MongoDB PHP Driver on Windows

Precompiled binaries for each release are available from » PECL for a variety of combinations of versions, thread safety, and VC libraries. Extract the archive and put php_mongodb.dll in your PHP extension directory ("ext" by default).

Add the following line to your php.ini file:


Note: Additional DLL dependencies for Windows Users

In order for this extension to work, there are DLL files that must be available to the Windows system PATH. For information on how to do this, see the FAQ entitled "How do I add my PHP directory to the PATH on Windows". Although copying DLL files from the PHP folder into the Windows system directory also works (because the system directory is by default in the system's PATH), this is not recommended. This extension requires the following files to be in the PATH: libsasl.dll

add a note add a note

User Contributed Notes 2 notes

luchontandil3 at gmail dot com
1 month ago
Try using:


instead and restarting the xammp server for php
also download the correct .dll for your version of php

you can check your version of php with index.php and inside adding

Xylon Reyes
3 years ago
With the newer version of MongoDB, this should be...


(the filename of the latest stable release at PECL)

Official MongoDB library are available at GitHub as well as its documentation.

Precompiled binaries are also available at GitHub for the legacy and the newer version.
To Top