How to reproduce:

* Install PHP 7.2 (I use backports from the Debian maintainer: https://deb.sury.org/)
* Install Aegir 3.x with Nginx

You will have to edit /var/aegir/config/includes/nginx_vhost_common.conf manually, to set "fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;".

What happens:

In provision/http/Provision/Service/http/nginx.php, getPhpFpmMode() explicitly checks for the PHP 7.0 socket file. If it does not exist, it assumes we are running in 'port' mode, making getPhpFpmSocketPath() return FALSE.

Proposed fixes:

- Convert the two socket consts to a protected variable, which would be set inside "init_server()", depending on what file exists?

- and/or, in `getPhpFpmSocketPath()`:

    // Return the socket path based on the PHP version.
    if (strtok(phpversion(), '.') == 7) {
      $minor = strtok('.');
      return '/var/run/php/php7.' . $minor . '-fpm.sock';
    }
    else {
      return self::SOCKET_PATH_PHP5;
    }

Comments

bgm created an issue. See original summary.

colan’s picture

Status: Active » Needs review
colan’s picture

bgm’s picture

Status: Needs review » Closed (duplicate)

oops indeed. I had glanced over that issue, but assumed it was just a packaging issue :-)

The patch works for me. Thank you!