I’m facing an issue while trying to configure multiple PHP versions on my Virtualmin server. After installing multiple PHP versions and setting one as the default for my domains, I noticed that some of the domains are not picking up the correct PHP version and are still using the old version despite changing the configuration.
I’ve followed the installation process mentioned in the guide (check.virtualmin.com/docs/server-components/configuring-multiple-php-versions/) and confirmed that the PHP versions are installed correctly. However, when I go into Virtualmin and try to set the default PHP version for a specific domain, it doesn’t seem to take effect. Additionally, some of the domains continue using the wrong PHP version, and when I try to change it manually in their settings, it doesn’t update as expected.
I also tried to check the available PHP versions through the Virtualmin interface and verified that PHP 8.3 was available, but it’s still not applying properly across different domains. I’ve even tried to re-check the configuration and restart the server, but the problem persists.
Has anyone encountered this issue before? Could this be related to PHP-FPM settings, or is there a deeper configuration issue in Virtualmin I might be missing? Any help would be greatly appreciated!
Here’s the code I’ve used for installing the PHP versions and configuring the default one:
# For RHEL, Alma, Rocky, Oracle, CentOS, Fedora
dnf install php81-php-{cli,fpm,pdo,gd,mbstring,mysqlnd,opcache,curl,xml,zip}
# For Debian/Ubuntu
apt-get install php8.1-{cgi,cli,fpm,pdo,gd,mbstring,mysqlnd,opcache,curl,xml,zip}
# Command to install PHP extensions for all versions
for php in $(ls /etc/php); do
sudo apt-get install -y "php$php-"{curl,intl};
done
Despite these commands, the correct PHP version still doesn’t apply. What could I be missing?