I have an RHEL 7.4 Server that currently hosting few web apps, one of these apps requires PHP Version <= v5.6 I'm going to add a new app that requires PHP version>=v7 Can I combine both these versions and have them running in parallel, and how?
You have several options to solve the problem of running multiple PHP versions simultaneously on your RHEL 7 server.
These options are fully supported by Red Hat under your existing subscription entitlement:
- Using Software Collections. These allow installing multiple versions of various software side by side on the same system without them interfering with each other.
- Using Red Hat provided Docker containers for running multiple apps on multiple software stacks. If you haven't already begun containerizing, your current project may make a good starting point.
Yes, I believe you can. Way back with php 4 and 5 we did this by loading one version of php as an apache mod, and the other version using php-cgi. If I remember right we created a handler for php5, and one for "php" and mapped the handler to the php files based on directory. You can use the "FilesMatch" apache directive to change which handler is assigned to php files based on virtualhost, directory, even .htaccess files.
You can use Virtualmin to manage web hosting and add multiple versions of PHP.
Then you can add hosting accounts and select which PHP versions they will use.