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
<?php
phpinfo();
>
PHP - Manual: Installing the MongoDB PHP Driver on Windows
2024-12-22
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:
extension=php_mongodb.dll
注意: Additional DLL dependencies for Windows Users
为了使此扩展生效, DLL 文件必须能在 Windows 系统的 PATH 指示的路径下找到。如何操作的信息,请参见题为“如何在 Windows 中将 PHP 目录加到 PATH 中”的FAQ。虽然将 DLL 文件从 PHP 文件夹复制到 Windows 系统目录也行,但不建议这样做。 此扩展需要下列文件在 PATH 路径中: libsasl.dll
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
<?php
phpinfo();
>
With the newer version of MongoDB, this should be...
extension=php_mongodb.dll
(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.
官方地址:https://www.php.net/manual/en/mongodb.installation.windows.php