interfasys
Verified User
Motivation
With all the various versions and variants of PHP out there, being only able to use 2 versions server wide is getting frustrating. Some users will want to test apps with alternatives such as HHMV or PHPNG, others will want to make sure their website won't break when migrating to PHP 5.6. The server admin may want to use HHMV for webapps because it's a controlled environment, while offering 5.3, 5.4, 5.5 and 5.6 to his clients.
Solution
CB2 has removed almost all references to PHP1_ and PHP2_, which means it can now compile and generate configs for an unlimited number of PHP versions and with a few changes made to DA, we could let a user select any installed PHP version.
Custombuild
Introduce a new file called phpversions.txt containing the various PHP versions that will be installed. That file can also contain the location of the source code in case it's not officially supported by CB.
The settings in options.conf now only apply to the server, not the users.
Only PHP-FPM is supported for the users
In build
* warn if php-fpm<php version>.conf does not exist in the custom folder
* use the info in phpversions.txt to decide which versions to compile and where to find them
* if the user has not set a preference yet, use the server's PHP version to generate configs
* if the user has selected a PHP version, use his preference to generate configs
Directadmin
In the GUI, populate the PHP version dropdown using the info from phpversions.txt.
In domain.conf, set phpX_select to a version
With all the various versions and variants of PHP out there, being only able to use 2 versions server wide is getting frustrating. Some users will want to test apps with alternatives such as HHMV or PHPNG, others will want to make sure their website won't break when migrating to PHP 5.6. The server admin may want to use HHMV for webapps because it's a controlled environment, while offering 5.3, 5.4, 5.5 and 5.6 to his clients.
Solution
CB2 has removed almost all references to PHP1_ and PHP2_, which means it can now compile and generate configs for an unlimited number of PHP versions and with a few changes made to DA, we could let a user select any installed PHP version.
Custombuild
Introduce a new file called phpversions.txt containing the various PHP versions that will be installed. That file can also contain the location of the source code in case it's not officially supported by CB.
Code:
php53
php54
php55
php56
php57:https://git.php.net/repository/php-src.git
hhmv3.2:https://github.com/facebook/hhvm/releases/tag/HHVM-3.2.0
The settings in options.conf now only apply to the server, not the users.
Only PHP-FPM is supported for the users
In build
* warn if php-fpm<php version>.conf does not exist in the custom folder
* use the info in phpversions.txt to decide which versions to compile and where to find them
* if the user has not set a preference yet, use the server's PHP version to generate configs
* if the user has selected a PHP version, use his preference to generate configs
Directadmin
In the GUI, populate the PHP version dropdown using the info from phpversions.txt.
In domain.conf, set phpX_select to a version
Code:
php1_select=php5.6
php2_select=hhmv3.2