Installing the MongoDB PHP extension

In this section, we will cover the steps to install the MongoDB PHP extension on Windows and Linux/Mac. It is highly recommended for both Linux and macOS users to use PECL (http://pecl.php.net/) to install ext/mongodbPECL stands for PHP Extension Community Library. It is a repository which contains PHP extensions that are written in language, which must be compiled and enabled in the php.ini file. For a Windows installation, on the other hand, all you need to do is to install the appropriate *.dll file, and enable the extension in the php.ini file.

Get MongoDB 4 Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.