NC25 down after upgrading to Ubuntu 22.04.01LTS with PHP8.1

I had this issue as well, the fix for me in the end after making sure everything was installed correctly and the /run/php directory existed with .sock files was to make sure that in the /etc/php/8.1/fpm/pool.d/www.conf file the listen line stated the correct .sock file name. In my case it was php8.1-fpm.nextcloud.sock. after changing that and restarting php8.1-fpm.service the socket was created and everything started working again.

in order to get it to use php8.1-fpm.nextcloud.sock and not php7.4-fpm.nextcloud.sock I needed to edit the /etc/apache2/sites-enabled/ files and set the correct entry for the PHP sock.

After all that I also had realized part of my problem was the PHP8.1-fpm default config uses php8.1-fpm.sock and my nextcloud for some reason was configured with php8.1-fpm.nextcloud.sock. I’ve since removed the mention of ‘nextcloud’ from the php8.1-fpm.sock file name to prevent that issue for happening again in future updates.

2 Likes

I had this upgrade also break everything. I ended up having to install several missing modules and reconfigure a bunch of things, but got it working eventually. I wrote about it here: I made a big mess

Just ran into the same issue. With the same error message about the php7.4.sock in /var/log/apache2/error.log The solution for me was these four commands:

a2dismod php7.4
a2enmod php8.1

a2disconf php7.4-fpm
a2enconf php8.1-fpm

then a:

systemctl restart apache2.service

I also had to manually install php8.1-memcache but that doesn’t have to do with this issue. Just a note.