Hello,
I recently updated my system from PHP 8.2 to PHP 8.3. The update process was straightforward through your interface. However, I encountered an issue with the MongoDB extension, which I need for my projects.
While using PHP 8.2, I successfully installed the MongoDB extension with a simple script. But, when I attempt to replicate the process for PHP 8.3, I consistently face errors, and the installation fails.
Could you provide guidance or assistance on how to properly install and configure the MongoDB extension for PHP 8.3 on Cleavr? Any help or suggestions would be greatly appreciated.
Thank you in advance for your support.
PHP 8.2.13
#!/bin/bash
# This script installs the MongoDB extension for PHP 8.2.13 on Ubuntu
# Set DEBIAN_FRONTEND to noninteractive to avoid interactive dialog
export DEBIAN_FRONTEND=noninteractive
# Update package lists
sudo apt-get update -y
# Install PHP development tools and the PEAR extension manager
sudo apt-get install -y php-pear php-dev
# Install the MongoDB PHP extension
sudo pecl install mongodb
# Add the extension to your PHP configuration
echo "extension=mongodb.so" | sudo tee -a /etc/php/8.2/fpm/php.ini
echo "extension=mongodb.so" | sudo tee -a /etc/php/8.2/cli/php.ini
# Restart PHP-FPM to apply changes
sudo systemctl restart php8.2-fpm
# Unset DEBIAN_FRONTEND variable
unset DEBIAN_FRONTEND