Mediawiki - Service unavailable

I tried this change on a development VM and it seems to work. @vexch, was your attempt on Debian stable?

I tried this on Debian testing.

/lib/systemd/system/php7.3-fpm.service contains

ExecStart=/usr/sbin/php-fpm7.3 --nodaemonize --fpm-config /etc/php/7.3/fpm/php-fpm.conf
ExecStartPost=-/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/7.3/fpm/pool.d/www.conf 73
ExecStopPost=-/usr/lib/php/php-fpm-socket-helper remove /run/php/php-fpm.sock /etc/php/7.3/fpm/pool.d/www.conf 73

Journalctl gives:
testing-fb systemd[4528]: php7.3-fpm.service: Executable /usr/lib/php/php-fpm-socket-helper missing, skipping: No such file or directory

Seems that php-fpm-socket-helper is available only in Debian unstable.

I tested the following configuration on unstable which should work for stable, testing and future versions of php-fpm:

    <FilesMatch ".+\.ph(ar|p|tml)$">
        <If "-e '/run/php/php-fpm.sock'">
            SetHandler "proxy:unix:/run/php/php-fpm.sock|fcgi://localhost"
        </If>
        <ElseIf "-e '/run/php/php7.4-fpm.sock'">
            SetHandler "proxy:unix:/run/php/php7.4-fpm.sock|fcgi://localhost"
        </ElseIf>
        <ElseIf "-e '/run/php/php7.3-fpm.sock'">
            SetHandler "proxy:unix:/run/php/php7.3-fpm.sock|fcgi://localhost"
        </ElseIf>
        <Else>
            Require all denied
        </Else>
    </FilesMatch>

Since future versions of php-fpm will contain the update-alternatives setup for /run/php/php-fpm.sock, we don’t have handle future versions specifically anymore. I tested various combinations for socket names and symlinks in /run/php/ and it seems to work.

Tested that it works on Debian testing.

@sunil Will this fix appear in the nearest update?

I have created a merge request for this. We still need a test conformation on stable release. It is highly likely that this will be merged before the release coming Tuesday. The fix should become available on your FreedomBox by the end of the week.

@sunil Dear Sunil, I thank you for returning of WikiMedia! After upgrading to version 20.4, WikiMedia returned as it had been. Thank you!

1 Like