On Ubuntu 20.04, when we installed PHP 7.4 using the geerglingguy.php Ansible role, we saw that this version of FPM defaults to port mode, not socket mode (as may have been the case in earlier PHP versions), whereas Provision still configured Nginx to look for a socket.
On further investigation we found that a symlink for /var/run/php7.4-fpm.sock did indeed exist, but led nowhere. This befuddled @colan's earlier code (see #2769587: Nginx: PHP FPM fails to detect socket mode on PHP 7) to determine which mode (port or socket) FPM was in, since he checks for the existence of that socket file, but does not verify that it is actually a real file.
We need to not only check that there is a correctly named file in /var/run, but also that, if it's a symlink, it leads to an actual socket file, and if not, default to port mode.
Comment | File | Size | Author |
---|---|---|---|
#3 | provision-3209815-3-check-that-socket.patch | 789 bytes | llamech |
#2 | provision-3209815-check-that-socket.patch | 1.04 KB | llamech |
Comments
Comment #2
llamechAdding a patch to confirm the file exists.
Comment #3
llamechUpdating to follow proper coding standards.
Comment #4
colanWas in wrong project so commit message didn't show up: 0a9077191df1e65272a0f06cf6443975ecf41294
Comment #5
colanConfirmed working on a client environment.