This is just an idea, but i wanted to test a site using another PHP version so i did the following

inside /var/aegir/config/includes/fastcgi_params.conf i added:

  ## Custom PHP FPM port
  set $custom_php_fpm_port 0;

inside /var/aegir/config/includes/fastcgi_params.conf (nginx_octopus_include.conf) I added

set $php_fpm_port 9090;
if ($custom_php_fpm_port) {
  set $php_fpm_port $custom_php_fpm_port;
}

and I changed all occurrences of 9090 with $php_fpm_port.

inside my vhost file I added to swith to PHP 5.2.17:

  set $custom_php_fpm_port 9000;

This works, but if the site gets verified to vhost will get rewritten, so to have this inside aegir we need:

  1. A platform option to specify the PHP version (or port), if not set it will use the default
  2. A site option to specify the PHP version (or port), if not set it will use the platform one
  3. A way to tell drush which PHP version to use

Comments

omega8cc’s picture

This is what Octopus is for. You can set PHP-FPM version per Octopus instance: http://drupalcode.org/project/octopus.git/blob/HEAD:/OCTOPUS.sh.txt#l66

Doing it per platform/site is not really possible without serious hacking in the Provision and Hostmaster, so I'm not sure it is worth the effort while we have a clean and working solution already - PHP-FPM version per Octopus instance.

Note that it is not possible to set/use different PHP-CLI per Octopus instance, unless we will patch the Drush itself, so it is currently per server variable: http://drupalcode.org/project/octopus.git/blob/HEAD:/BARRACUDA.sh.txt#l66

Also, in fact it is only related to D6 sites, as both D5 and D7 and up are hardcoded to use the highest compatible PHP-FPM version: http://drupalcode.org/project/barracuda.git/blob/HEAD:/CHANGELOG.txt#l74

attiks’s picture

I know about Octopus and the possibility to swap PHP version, but the problem is you can not clone between Octopus installs, we use a Barracuda install also for development and since PHP 5.4 got released we're looking for an easy way to test sites on PHP 5.2, PHP 5.3 and PHP 5.4, so the idea was to take an existing site, clone it twice and alter the PHP version.

I know all this depends heavily on provision and drush, but I want to find out if Barracuda will support it once it's implemented for provision and drush.

omega8cc’s picture

Sure, patches are welcome.

attiks’s picture

Status: Active » Postponed
omega8cc’s picture

Version: » 6.x-2.x-dev
Component: Miscellaneous » PHP-FPM Server
Issue summary: View changes
Status: Postponed » Fixed

There is some progress in head. You can install PHP 5.5, 5.4, 5.3 and 5.2 and run all of them in parallel, so you can set different version per Octopus instance (still separately for FPM and CLI). Plus, now the instance owner (w/o root access) can easily switch his instance between PHP 5.5, 5.4 and 5.3 with simple control files, also separately for CLI and FPM.

Maybe we will improve this further in the future, but at this point it is not possible to run different version per platform. But it is very easy to switch the instance between versions without running any upgrade etc, so I hope we can consider this as fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.