Similar to I'm trying to install mailparse on xampp.
As we have seen in my earlier post that. But we didn’t see how mongodb will connect to php. I usually use xampp for my local development which have php 7.2 version. So we will be configuring mongodb on xampp to make it works.If you don’t have xampp on your machine, please have a look on.By default, PHP in XAMPP has no mongodb support. So we have to download mongodb extension from and configure it in xampp.So lets started.Also Read:.Steps: Install Mongodb Driver for PHP 7 on XAMPP. Check your current PHP version and also check that it is Thread Safe or not.
Install Pecl Xampp Windows Xp
My PHP version is 7.2 with thread safety enabled. Goto and download driver according to your windows and php version. I am going to download because I have windows 10 64bit. After downloading zip file. Unzip that zip file and copy phpmongodb.dll to your xamppphpext directory.I have installed xampp in D: drive so my path will be D:xamppphpext. Now open php.ini by clicking Config and then click on PHP(php.ini) in XAMPP control panel.
Add extension=phpmongodb.dll in php.ini and save it. Restart XAMPP. Now again check PHP info. Now there will be a separate section for mongodb. If you didn’t find mongodb section in phpinfo then make sure you downloaded current mongodb driver zip. Now open cmd and start mongodb server my typing mongod command.

Pecl Install Local
Now create a mongo-test.php file in htdocs to check php and mongodb communication. Microsoft speech platform sdk. Now run mongo-test.php file from browser.
If all goes well, you should get object.Note: Default address of mongodb server is 127.0.0.1 and default port is 27017. Test code: (mongo-test.php).