Multiple PHP versions
Does BlueOnyx support using multiple different PHP versions?
Yes, BlueOnyx 5209R, 5210R and 5211R do.
On BlueOnyx 5209R, 5209R and 5211R you can run multiple PHP versions at the same time. By default 5209R, 5210R and 5211R run with an OS supplied older PHP version. From the BlueOnyx Shop you can also obtain our PHP packages and Virtual sites can then use either the OS supplied PHO or one of the shop supplied PHP versions. :
- PHP (DSO) *
- PHP (DSO + mod_ruid2) *
Each of these implementation has different benefits. Naturally, for enhanced security you should use one of the last three options, as they allow to run PHP scripts under the UID and GID of the siteAdmin of the virtual site that they belong to. Please note: BlueOnyx 5211R no longer uses the DSO methods to integrate PHP, as these conflict with Apache's HTTP/2 integration. But you can still use multiple different PHP versions via suPHP or PHP-FPM.
There are several different optional PHP versions available in the BlueOnyx Shop:
- PHP53-5.3.29 (EOL, 5209R only)
- PHP54-5.4.45 (EOL, 5209R only)
- PHP55-5.5.38 (EOL, 5209R only)
- PHP56-5.6.40 (EOL)
- PHP70-7.0.33 (EOL)
- PHP71-7.1.33 (EOL)
- PHP72-7.2 (EOL)
- PHP73-7.3 (EOL)
- PHP74-7.4 (EOL)
- PHP80-8.0 (latest version)
- PHP81-8.1 (latest version)
- PHP82-8.2 (latest version)
The new thing is that you can now install all of them at the same time - if you wish to do so!
Once installed, the new PHP version(s) become available for usage. Provided you enable them in the PHP settings of your BlueOnyx 5209R, 5210R or 5211R:
This GUI page allows you to enable/disable the various installed (optional) PHP versions. You can also choose to switch the Apache webserver to a different PHP version than the OS provided PHP. However, due to the new implementation of PHP this may no longer be necessary, as you can now choose which PHP version a virtual site should use:
If multiple PHP versions are installed (and active), then you can choose the PHP version which a virtual site should use in a pulldown called "Vsite PHP Version".
Please note: This only works if suPHP or "FPM/FastCGI" are used. The "PHP (DSO)" based methods (if available) still use the default PHP version. Which can either be the OS supplied one, or one from the extra PHP packages that are installed and active.
Used UID/GID for PHP script execution:
When you use PHP with DSO+mod_ruid2, suPHP or PHP-FPM, then you MUST configure a siteAdministrator to be owner of the /web folder. This siteAdmin UID/GID is then also used to execute the PHP scripts. Here is how you do that:
Make sure the Vsite has at least one user and that this user has the checkbox "Site Administrator" ticked. This user should also have as much disk space allocated as you plan to use for your website.
In the Vsite in question go to "Services" / "Web Ownership" and select the siteAdmin which you want to use to execute PHP scripts. Then save the changes. This will change the UID/GID of the /web folder (and everything within) to the UID/GID of this siteAdmin and will also configure PHP properly so that PHP scripts are executed as this user.
To make it easier to identify the PHP versions that virtual sites are using the Virtual Site List has also been modified to show the PHP version that virtual sites use:
The new PHP packages are available in the BlueOnyx shop. If you have purchased PHP for BlueOnyx with a current support subscription to the PHP packages, then you will also get the updates to these packages whenever we release them. Once you install an updated PHP package for a certain version, then all virtual sites that use this version will start using the updated version.
When you remove a PHP extra package, then all virtual sites that currently use it will revert back to the OS provided PHP version of PHP.
The overhead of running different PHP versions at the same time is very small. So you can easily install all extra PHP versions and can use them all at the same time for different virtual sites.