In above, I logged in the User4 account and have changed the CLI, as you suggested.
Overview:
/usr/bin/php7.4 -v shows —> 7.4 and php 7.4 is installed manually as mentioned above.
Account user config for PHP CLI is 7.4
php-fpm template for the user4 is 7_4
v-rebuild-user executed. No change.
-Rebooted multiple times. No change.
Is there something I am still missing?
Or multiple php versions of 7.4 (User4) as well as 8.0 (User1-3) under different user accounts are not possible?
You need to login and logout again after you changed it.
We alter the .bash_alias file:
I have no idea why it doesn’t work.
In .bashrc there code below should be included and your client need to read .bashrc file…
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
Thanks for the above hint. Now it works and cli shows the env correct.
As mentioned in my above description, I had simply added php 7.4 in the system. therefore, bash_alias was missing. It gets created by the command in the last step.
The last step in my above steps was missing after executing v-add-web-php 7.4. For others, who want to follow the process I did above, you have to execute the last step as follows: