How use mongodb with php 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 the php.ini file for each environment in which you intend to use the driver:

extension=php_mongodb.dll

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

luchontandil3 at gmail dot com

2 years ago

Try using:

extension=php_mongodb.dll

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

Chủ Đề