Installation
PHP Manual

Installing the MongoDB PHP Driver with PECL

Information zur Installation dieser PECL-Extension finden sie im Kapitel Installation von PECL-Extensions. Zusätzliche Informationen wie neue Releases, Downloads, Quelldateien, Maintainerinformation und ein CHANGELOG finden Sie hier: » http://pecl.php.net/package/mongodb

Linux, Unix, and macOS users may run the following command to install the driver:

$ sudo pecl install mongodb

Hinweis: macOS Homebrew users should consider using the Homebrew installation process instead of manually installing the driver via PECL.

If your system has multiple version of PHP installed (e.g. macOS default and » XAMPP), note that each version of PHP has its own pecl command and php.ini file.

Installing the driver via PECL will use bundled versions of » libbson and » libmongoc and attempt to automatically configure them.

Hinweis: If the build process fails to find an SSL library, check that the development packages (e.g. libssl-dev) and » pkg-config are both installed. If that does not resolve the problem, consider using the manual installation process.

Finally, add the following line to your php.ini file:

extension=mongodb.so


Installation
PHP Manual