Your teams look right. Did you restart apache before testing?
sudo service apache2 restart
The php5.6 PHP module created by Ondrej Suri can only be enabled:
sudo a2dismod php7.0 sudo a2dismod php7.1 sudo a2dismod php7.2 sudo a2dismod php7.3 sudo a2enmod php5.6 sudo update-alternatives
I found that this setting is not compatible with MPM modules other than PREFORK. You must make sure to disable ALL other MPM modules first before enabling the php5.6 mod.
If the mod is not enabled, you may need to try disabling other MPMs.
sudo a2dismod mpm_prefork sudo a2dismod mpm_worker sudo a2dismod mpm_event
Then try turning on the mod again, as it should automatically turn on the correct MPM.
$ sudo a2enmod php5.6 Considering dependency mpm_prefork for php5.6: Considering conflict mpm_event for mpm_prefork: Considering conflict mpm_worker for mpm_prefork: Module mpm_prefork already enabled Considering conflict php5 for php5.6: Enabling module php5.6. To activate the new configuration, you need to run: service apache2 restart
For your information, I like to put these commands in my ".bash_aliases", so they are always at hand for working with DEV.
# Aliases - PHP alias php.info='php -i' alias php5.6='sudo a2dismod php7.0 && sudo a2dismod php7.1 && sudo a2dismod php7.2 && sudo a2dismod php7.3 && sudo a2enmod php5.6 && sudo update-alternatives --set php /usr/bin/php5.6 && sudo service apache2 restart' alias php7.0='sudo a2dismod php5.6 && sudo a2dismod php7.1 && sudo a2dismod php7.2 && sudo a2dismod php7.3 && sudo a2enmod php7.0 && sudo update-alternatives --set php /usr/bin/php7.0 && sudo service apache2 restart' alias php7.1='sudo a2dismod php5.6 && sudo a2dismod php7.0 && sudo a2dismod php7.2 && sudo a2dismod php7.3 && sudo a2enmod php7.1 && sudo update-alternatives --set php /usr/bin/php7.1 && sudo service apache2 restart' alias php7.2='sudo a2dismod php5.6 && sudo a2dismod php7.0 && sudo a2dismod php7.1 && sudo a2dismod php7.3 && sudo a2enmod php7.2 && sudo update-alternatives --set php /usr/bin/php7.2 && sudo service apache2 restart' alias php7.3='sudo a2dismod php5.6 && sudo a2dismod php7.0 && sudo a2dismod php7.1 && sudo a2dismod php7.2 && sudo a2enmod php7.3 && sudo update-alternatives --set php /usr/bin/php7.3 && sudo service apache2 restart'
GIST: https://gist.github.com/djravine/376e81a018ba2b980750a5578deb3935
source share