How to install PHP 5.6.40 as an optional version on Debian 9 (Stretch) perfect server
The Debian 9 (Stretch) distribution includes PHP version 7.0 by default. The main versions of PHP are not fully compatible with each other, so it is often the case that web pages running on the server require a newer or even older version of PHP. In this description, we install the current latest version of PHP 5.6, 5.6.40, as an optional PHP version for a Debian 9 (Stretch) -based perfect server, which can then be run in FastCGI and PHP-FPM modes. This will allow it to be used for websites in addition to the default version of PHP in the distribution. On this page, we prepare the requirements for compiling the source code for PHP 5.6, and then compile and install PHP.