How can I find a compiled PHP?

Hello! On my VDS is not enough memory to compile PHp 5.6.26, and I compiled PHP on a virtual machine with Ubuntu 16.04 x64 (with the command make, then make install). How can I already compiled the program to drag on a 8.5 VDS with Debian Jessie?
Explain why I need it and why can't I put PHP 5 with the command apt-get install php5
I have installed PHP server 7.0 ( with the command apt-get install php7.0), after adding system repositories with PHP 7, but since the Bitrix for normal operation requires PHP 5, I need 2 versions of PHP on one VDS - 7.0 and 5.6
On VDS to compile PHP I can't, because the VPS has only 512 MB of RAM.
July 4th 19 at 23:20
3 answers
July 4th 19 at 23:22
Why you even tried/trying to do?

apt-get install php5
Because I have 2 versions of PHP on the server - 7.0 and 5.6.24 (26) - august.Altenwerth83 commented on July 4th 19 at 23:25
: so it can look for ready-made options: https://github.com/phpbrew/phpbrew - bailee_Stant commented on July 4th 19 at 23:28
: Not a ride. phpbrew compile php, but the question stated that there is not enough memory. - Amie commented on July 4th 19 at 23:31
In General, just compiled PHP from source 5.6.26. Now php 5 is in /opt/php56
What to do next? PS make test has shown that some (2 or 3 tests) failed. 5 tests issued a warning. - august.Altenwerth83 commented on July 4th 19 at 23:34
July 4th 19 at 23:24
If php7.0 put with dotdeb, this package is quite compatible with 5.6.24 of the distribution (although even if not there, then it is likely that it will start normally). To compile nothing.

However apache via mod_php can only use one version (no matter how set), but using cgi/fastcgi or php-fpm it is possible to have at least 20 different.
Yes. PHP 7.0 dotdeb set. But the problem is that some virtual hosts Apache2 was PHP 5 instead of 7. - august.Altenwerth83 commented on July 4th 19 at 23:27
: It is written in the second part of my answer: these khostov you need to configure php via mod_php, and some other way. Personally, I would prefer php-fpm, which is connected approximately with the line in your apache configuration:

ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:8080/path/to/vhost/root/$1

How to set up php-fpm (including, without apache in General, and in conjunction with nginx) is written on every fence. - bailee_Stant commented on July 4th 19 at 23:30
Put Apache2 + php7.0-fpm - Amie commented on July 4th 19 at 23:33
July 4th 19 at 23:26
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update

https://launchpad.net/~ondrej/+archive/ubuntu/php

Find more questions by tags DebianPHPUbuntu