I need to switch the PHP version from 8.0 to 7.4 on Ubutnu 20.04. I tried to run the commands below (but without success):
sudo a2dismod php8.0
sudo a2enmod php7.4
sudo service apache2 restart
When I open a local webpage with the PHP info <?php phpinfo(); ?>, the PHP version is still 8.0.3 and not 7.4.
Note that when I execute the command sudo a2enmod php7.4 I get the following output:
dan@dan:~$ sudo a2enmod php7.4
Considering dependency mpm_prefork for php7.4:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Enabling module mpm_prefork.
Considering conflict php5 for php7.4:
Enabling module php7.4.
To activate the new configuration, you need to run:
systemctl restart apache2
Maybe is that the source of the issue?