Skip to content

Commit ec73096

Browse files
committed
GitHub Actions: Restart PHP-FPM
1 parent d6edb49 commit ec73096

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,19 @@ jobs:
145145
php-version: ${{ matrix.php-versions }}
146146
coverage: xdebug
147147

148+
# Workaround for PHP 8.3 (and potentially other versions): the GitHub
149+
# Actions ubuntu-latest runner ships with a pre-installed PHP that leaves
150+
# an empty regular file at /run/php/php<version>-fpm.sock. setup-php
151+
# installs a different patch version on top, but PHP-FPM never replaces
152+
# the stale file with a real Unix socket, so nginx returns 502.
153+
# Removing the stale file and restarting PHP-FPM forces a clean socket.
154+
- name: Restart PHP-FPM
155+
run: |
156+
sudo rm -f /run/php/php${{ inputs.php-version }}-fpm.sock
157+
sudo systemctl restart php${{ inputs.php-version }}-fpm
158+
sleep 1
159+
ls -la /run/php/
160+
148161
# Configure nginx to use the PHP version and WOrdPress installation at /var/www/html
149162
- name: Configure nginx site
150163
run: |

0 commit comments

Comments
 (0)