On 02.04.2017 11:19, jdd wrote:
Hello,
I need to test some programs with php5 and with php7
both seems to be available in yast (42.2)
is it safe to install both on the same computer?
if so, how can I make sure my php (web) applications use the desired version? virtualserver on apache or .htaccess?
thanks jdd
If you install php7, php5 will get deinstalled. Both packets provide /usr/bin/php (see zypper info --provides php7 and the same with php5) and therefore conflict. With default opensuse, you cannot run 2 different php versions. Afaik, running 2 different versions in one apache is only possible with cgi (fascgi), and you have to install a 2nd php on a non-system location. You could also run 2 apache webservers with 2 different mod_php on different ports (port 80 and 8080 for example). Another solution: Use a virtual system like kvm, lxc, docker, ... install the php7 environment there. If you only have one public IP, you can use apache virtual hosting and mod_proxy to route some of the http traffic to your php7-VM.