[opensuse] php5 and php7
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 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
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.
Le 02/04/2017 à 12:06, Florian Gleixner a écrit :
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.
odd I have the choice on hostinger.fr of the php version, I hope all this will work with the free hosting sufficiently to test what I have to do thanks jdd -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
jdd wrote:
Le 02/04/2017 à 12:06, Florian Gleixner a écrit :
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.
odd
I have the choice on hostinger.fr of the php version,
As you do on openSUSE, but does hostinger.fr offer both at the same time? -- Per Jessen, Zürich (14.2°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 02/04/2017 à 12:57, Per Jessen a écrit :
As you do on openSUSE, but does hostinger.fr offer both at the same time?
it's a free hosting, so I can have as many accounts I want and choose for each the php version I need I need to test a software with each version thanks jdd -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
jdd wrote:
Le 02/04/2017 à 12:57, Per Jessen a écrit :
As you do on openSUSE, but does hostinger.fr offer both at the same time?
it's a free hosting, so I can have as many accounts I want and choose for each the php version I need
Okay. As Florian suggested, you need two openSUSE machines, one with php5, one with php7. -- Per Jessen, Zürich (16.3°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/02/2017 04:19 AM, 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
There is NO techinical reason you cannot install both except for rpm restrictions. I have both installed on all Arch servers as most apps still require php5 and have not been fully ported to 7. On Arch php5 installs to: /usr/lib/php56 with config in /etc/php56 php7 installs to the normal php folders. Then all that is required to chose between the two is to set the interpreter at the top of any .php file that requires php5 to the correct executable, e.g.: #!/usr/bin/php56 -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 05/04/2017 à 05:50, David C. Rankin a écrit :
Then all that is required to chose between the two is to set the interpreter at the top of any .php file that requires php5 to the correct executable, e.g.:
#!/usr/bin/php56
isn't it possible to use .htaccess to do the map php->phpX I didn't use .htaccess for a long time now thanks jdd -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
jdd wrote:
Le 05/04/2017 à 05:50, David C. Rankin a écrit :
Then all that is required to chose between the two is to set the interpreter at the top of any .php file that requires php5 to the correct executable, e.g.:
#!/usr/bin/php56
isn't it possible to use .htaccess to do the map php->phpX
I didn't use .htaccess for a long time now
If you're running apache with preforked workers, by the time .htaccess is read, php is already loaded. In Apache, the only way to run separate php versions is cgi (fastcgi or plain cgi). -- Per Jessen, Zürich (8.5°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 05/04/2017 à 08:33, Per Jessen a écrit :
jdd wrote:
I didn't use .htaccess for a long time now
If you're running apache with preforked workers, by the time .htaccess is read, php is already loaded.
In Apache, the only way to run separate php versions is cgi (fastcgi or plain cgi).
ok, thanks anyway as I found a free host that allows switching between php version, I could test my code and validate it thanks jdd -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
David C. Rankin
-
Florian Gleixner
-
jdd
-
Per Jessen