There are a few cases where you might want to keep your old version of PHP for compatibility, or preference, but also need a newer or cutting edge version for a particular app (eg. Nextcloud [howto/whyto post to follow]).
Fear not – this CAN be done. Here’s my marginally modified version of the post from here
check if your changes worked using something like this …
php -i | grep "opcache\|YOUR_MOD_NAME"
Once this is done and running, create a test VirtualHost …
This example is set up for PHP 5.6.
If you wanted to use 7.3, you would change this line in the config, and then restart apache2
1 thought on “Multiple versions of PHP (Debian Stretch 9.x)”
Wow that was unusual. I just wrote an extremely long comment but after I clicked submit
my comment didn’t appear. Grrrr… well I’m not writing all that over again. Anyway, just wanted to say wonderful blog!