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
Comment #2
colanI think I fixed this in #2791095-12: Support php5.6, php7.2 and phpx.x-mysqlnd packages. Can you verify?
Comment #3
colanComment #4
bgm CreditAttribution: bgm at Coop SymbioTIC commentedoops indeed. I had glanced over that issue, but assumed it was just a packaging issue :-)
The patch works for me. Thank you!