I am trying to setup a CentOS server with multiple php versions.
I've managed to do this so far by installing the REMI software collections of
php70 and I got Apache running with different versions etc.
So far so good. Typing
php on the command line does not give any information but
php56 -v does, for example. So far this is expected behaviour.
I have a few questions now:
1 - I am now curious what will happen to softwares that have scripts that use
php on the command line. Like composer scripts? Obviously if the scripts try to run command-line php they will fail.
1a. Is it correct to assume that I have to create a symbolic link between
php and the actual
php70 for example?
1b. Are there other executables that need to be linked as well? I saw somewhere that
phar was linked and some other things. How do I know all the files that need to be linked?
2 - If I try to install
phpmyadmin via YUM, it expects to download
php 5.4 package.
This itself poses a lot of questions in my mind. What do I do in this case because I definitely don't want 5.4 anywhere near my system. And I think obviously if I do step 1a above, YUM will still request to download php dependency. Is there a way I can prevent that or possibly "explain" to YUM that php is already installed as php70 let's say? Or to just ignore the dependency?
Sorry if these are silly questions I have only limited experience in Linux and definitely not enough understanding of YUM. Also this is the first time I face a multiple version issue. Thanks!
I understand that I have installed the version-specific packages and that's mostly intended because I wanted multiple versions for Apache. I guess the question is how to handle other software that wants to run php on the command line, how to handle YUM php dependencies and what is the usual approach for this scenario?