run php5 and php7

2 posts / 0 new
Last post
#1 Fri, 05/06/2016 - 09:56
edwardsmarkf

run php5 and php7

hello - is it possible to have two different virtual servers run different versions of php?

UPDATE:

1) i installed php5 on at /usr/local/bin/php5

2) in httpd.conf, i changed any '7.0' to '5.6'

AddHandler fcgid-script .php5.6
FCGIWrapper /home/myDomain.com/fcgi-bin/php5.6.fcgi .php
FCGIWrapper /home/myDomain.com/fcgi-bin/php5.6.fcgi .php5.6

3) i copied /fcgi-bin/php7.0.fcgi to /fcgi-bin/php5.6.fcgi and changed the final line:

exec /usr/local/bin/php-cgi5

4) mkdir /etc/php5.6; and copy php.ini from /etc/php7.0 to /etc/php5.6

now when i reference a webpage with

<?php   phpinfo();  ?>


i now successfully see:

PHP Version 5.6.21

could anybody please verify my steps? since i guessed at everything so far i really dont trust this.

Fri, 05/06/2016 - 14:38
chupi

You have a tutorial (in Spanish but very easy) at: http://www.xn--apaados-6za.es/tenemos-que-apanar/internet-tutoriales-y-t...

Topic locked