Nextcloud fails on Alpine 3.16 -> 3.17 upgrade - Nextcloud 25.0.1 & php-cgi 8.1 cannot find files
I have just upgraded my Nextcloud server (an LXC instance) from Alpine 3.16 to 3.17.
This required upgrading Nextcloud to 25.0.1 as well as PHP to 8.1.
My Nextcloud was working fine on Alpine 3.16 with lighttpd using pgp-cgi (not FPM) and sqlite.
It seems that several php packages have not been updated and after a bit of research, I have manually updated php81-pdo_sqlite, php81-pecl-apcu and several others. After a bit of effort I can now run occ and have finished the Nextcloud upgrade.
However, the Web and DAV functions run via lighttpd do not work. My Nextcloud error log tells me, embedded deep in PHP's verbose logging...
Error: Class \"OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin\" not found at /usr/share/webapps/nextcloud/remote.php#62
Error: Call to undefined function simplexml_load_file() at /usr/share/webapps/nextcloud/lib/private/App/InfoParser.php#69
When I attempt to login in via the web browser, I just get a blank screen. DAV clients just fail.
It seems that pgp-cgi knows about fewer modules than php or php-fpm
# php-cgi8 -m|wc
22 22 158
# php81 -m|wc
42 44 293
# php-fpm81 -m|wc
43 45 302
I have tried installing and enabling php81-FPM and when I use that with lighttpd, I get some functionality back - I can login to NC's web front end and some things work (e.g. Notes, but not Files) DAV fails and messages like this imply that NC may be finding the wrong version of Sabre.
OCA\\DAV\\Connector\\Sabre\\FilesPlugin::OCA\\DAV\\Connector\\Sabre\\{closure}(): Return value must be of type ?int, float returned
Has Nextcloud on Alpine been tested with php-cgi? Is there a fix to make php-cgi see the correct libraries for Nextcloud? I seems that several things have been overlooked with the move to PHP 8.1.