Different PHP version per directory
In the DirectAdmin control panel you can choose a PHP version for the entire hosting account.
Of course, you may want to deviate from this per script/directory or subdomain by choosing a different PHP version.
In that case, place a file named .htaccess with the following content in the directory in question:
<FilesMatch "\.(php4|php5|php3|php2|php|phtml)$">
SetHandler application/x-lsphp71
</FilesMatch>
This is an example for selecting PHP 7.1. Change x-lsphp71 to 72 and ... yes, PHP 7.2 will then be active in that directory.
If you want to select certain modules for that version, first set that version as the default in DirectAdmin, then configure the modules and options, and then switch back to the version for the entire hosting account.
