MongoDB and PHP on Raspberry OS (32-bit & 64-bit)

sudo apt install php-dev
pecl install mongodb

Create an .ini module (check what PHP version is installed: 7.0, 7.3,etc.

sudo nano /etc/php/7.3/mods-available/mongodb.ini

Add the following line:

extension=mongodb.so

Save and enable module, restart the apache server:

sudo phpenmod mongodb
sudo service apache2 resstart

Version could be different, just check phpinfo():

Leave a Reply

Your email address will not be published. Required fields are marked *

Yandex.Metrica