Installing the MongoDB PHP Driver with PECLこの PECL 拡張モジュールをインストールする方法は、 マニュアルの PECL 拡張モジュールのインストール という章にあります。 新規リリース・ダウンロード・ソースファイル・管理者情報・CHANGELOG といった関連する情報については、次の場所にあります。 » https://pecl.php.net/package/mongodb Linux, Unix, and macOS users may run the following command to install the driver: $ sudo pecl install mongodb On systems with multiple version of PHP installed (e.g. macOS default, Homebrew, » XAMPP), each version of PHP will have its own pecl command and php.ini file(s). Additionally, each PHP environments (e.g. CLI, web) may use separate php.ini files.
As of driver version 1.17.0, PECL will prompt for various
$ yes '' | sudo pecl install mongodb
A complete list of supported $ sudo pecl install --configureoptions='with-mongodb-system-libs="yes" enable-mongodb-developer-flags="no"' mongodb By default, installing the driver via PECL will use bundled versions of » libbson, » libmongoc, and » libmongocrypt and attempt to automatically configure them.
Finally, add the following line to the php.ini file for each environment that will need to use the driver: extension=mongodb.so |