Roll back to PHP7

Hello there,

I messed up on my server (Raspberry Pi) and am currently stuck, so any help is highly appreciated.

What I did to cause the problem: Update system before nextcloud server
Now I have PHP8 installed but a version of nextcloud that only supports php7.4. To update nextcloud however, I need an older version of php…

What I tried to fix it:

  • Downgrade to php7.4, unfortunately no older versions available in /var/cache/pacman/pkg nor did I find something like the arch package archives for ARM.

  • Install php7 and required packages specifically and remove standard php (=php8) so it won’t interfere. Trying to use occ commands however I see an error message:

    An unhandled exception has been thrown:
    Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: could not find driver in /usr/share/nginx/nextcloud/lib/private/DB/Connection.php:67
    Stack trace:
    and then 32 more lines

I’m using mariadb, is there a package to be installed for php7 like php-mysql or php-mariadb? I remember doing something like that in the early times of setting up nextcloud/owncloud, but that was on raspbian I think.

Thanks for every advice/tip/hint that you can give me.

Best regards,

Oh man, I think I was just blind…

Forgot that I have to enable the extensions in php.ini. :see_no_evil:

1 Like

So in case anyone does something as stupid as I did and stumbles into this: I guess removing standard php is not necessary I guess. Just point your nginx to php-fpm7 and copy over the config-files for php and php-fpm.

This way you will (hopefully) not have to copy you’re old config-files over the new ones when you reinstall the current php version as I did.

We have php7 in our repos …