Gérer les cookies utilisés pour la publicité, tels que la personnalisation des annonces, le remarketing et l’analyse des performances des annonces.
2.8.16. Work with MongoDB
General information
Attention!
You can only work with external databases; MongoDB databases are not supported on our hosting.To connect to external MongoDB databases, you need to enable the mongodb module and install the library to work with it.
Enable module
The mongodb module is available on the hosting in two versions:
- mongodb (v 1.x) — PHP 5.4-8.4 (for PHP 5.4 and 5.5, only outdated versions of the extension are supported — 1.2.11 and 1.6.0, respectively).
- mongodb2 (v 2.x) — PHP 8.1-8.4.
- Open the "PHP settings" section.
- In the "PHP Modules" section, enable the "mongodb" module of the required version and save the changes.
- Wait 10-15 minutes for the changes to take effect.
Install library
- Connect to the hosting via SSH.
- Go to the desired directory (instead of
example.com/www/, specify the path to the desired directory):cd ~/example.com/www/ - Install the extension using ini file of the site (instead of
www.example.com, specify the site for which the mongodb module is enabled):php -c ~/.system/php/www.example.com.ini -f /usr/local/bin/composer require mongodb/mongodb