[Wanted] Unlimited versions of PHP

interfasys

Verified User
Joined
Oct 31, 2003
Messages
2,100
Location
Switzerland
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.
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
 
Would be a great feature.

Currently we are using php version 5.4 with 5.5 but want to support 5.6 also but there can only be 2 uses at the moment.
 
Oh yes. I agree. Would be of immense value. Of course having it completely wide open based on a text file would present some real challenges as CB does do a lot to help us avoid collisions - but I love the concept.
 
This would certainly be nice. I know of a Dutch hoster, which made a choice between 5.3, 5.4 and 5.5 in his DA hosting environment.
The user can choose which version of php he wants to have working for his account from within the DA panel.
I don't know how they did that, but it's very nice and easy to use.
Customers would really benefit from that. Especially because they could test the scripts on their website if they would work with a newer version of php when one version would be announced to be removed.
 
I know of a Dutch hoster, which made a choice between 5.3, 5.4 and 5.5 in his DA hosting environment.

Aren't they using CloudLinux with their own PHP-selector? Do you have a screenshot from their PHP selector?
 
It was even more then I thought, you can choose between php 5.3, 5.4, 5.5 and 5.6. However I don't know if they are using cloudlinux. That could be the case but I don't know.

I managed to get some screenshots for you.

This is how it's visible in directadmin:
phpversion.png

And this is the selection screen. With the pulldown on top of the screen (see arrow) you can select the php version you want to use:
phpversion2.png

This is great isn't it? Like I said, I don't know if this is cloudlinux, but it would be great if this could be done on standalone dedi's, so servers without cloudlinux.

P.s. why are the images shown as links and not displayed in the post? Are they too big?
 
Last edited:
CustomBuild2 allows already to have multiple versions of PHP with "./build php_expert"

I have for example:

Code:
PHP (default): 5.3 as suphpPHP (additional): 5.5 as fastcgi

and still can run :

Code:
./build php_expert 5.4 fastcgi

or

Code:
./build php_expert 5.6 fastcgi

The question is to have a PHP selector in Directadmin to choose those PHP versions.
 
Cool that works..

I have
PHP (default): 5.4 as php-fpm
PHP (additional): 5.6 as php-fpm

After this i did
./build php_expert 5.5 php-fpm

now i have running my 3 php prozess

php-fpm: master process (/usr/local/php54/etc/php-fpm.conf)
php-fpm: master process (/usr/local/php55/etc/php-fpm.conf)
php-fpm: master process (/usr/local/php56/etc/php-fpm.conf)

But Ioncube can not installed with costumbild2 into the php 55 build.
Also the service is not added automatic to the DA service check.
And finaly the php-selector is not showing the 5.5.

@ Martynas. It is a lot of work to implement this into Custombuild ?

Mario
 
Yes, me too.

I personally prefer to use mod_fcgid with -
PHP 4 (legacy code)
PHP 5.2 (Zend optimizer issue)
PHP 5.3 (Magic_quote_gpc , register_global)
PHP 5.6 (PHP 7 removed mysql php function)

No backward issue between PHP 5.4 and 5.5
Limited backward issue between PHP 5.5 and 5.6
 
This is getting more important to get in the next release or so of DA as PHP7 is just round the corner with it's 100% speed increase. Lots of apps will be happy on 7, but 5.6 will still be the go to option for most websites and there will be exception running on 5.5 as 5,4 is now EOL.
 
Back
Top