After seeing that CraftCMS now supports PHP 8, I went ahead and upgraded my server to PHP 8 (formerly, PHP 7.1 was running).

The problem I am now facing is the following:

1. PHP 7.1 was too low to upgrade Craft from 3.5 to 3.6.
2. Craft 3.5 does not support PHP 8, so I cannot use PHP 8 to upgrade to 3.6 either.
3. I then installed PHP 7.4 alongside PHP 8, as it seems to be the only PHP version that is able to upgrade from 3.5 to 3.6.
4. Unfortunately, I get the following error whenever I try to run `php7.4 craft upgrade all`:

```bash
root@debian-4gb-nbg1-1:/files# php7.4 craft update all
Fetching available updates ... done
Performing 2 updates:

    - craft 3.5.18 => 3.6.4.1
    - campaign 1.18.1 => 1.18.2

Backup the database? (yes|no) [yes]:
Backing up the database ... done
Performing update with Composer ... done
Applying new migrations ... error: The command "'/files/craft' 'migrate/all' '--no-backup' '--no-content'" failed.

Exit Code: 1(General error)

Working directory: /files

Output:
================

    Craft can’t connect to the database. Check your connection settings.

Yii Migration Tool (based on Yii v2.0.40)

Error Output:
================
PHP Warning:  Module "curl" is already loaded in Unknown on line 0
Exception 'craft\errors\DbConnectException' with message 'Craft CMS requires the PDO_MYSQL driver to operate.'

in /files/vendor/craftcms/cms/src/db/Connection.php:161

Caused by: Exception 'yii\db\Exception' with message 'could not find driver'

in /files/vendor/yiisoft/yii2/db/Connection.php:642

Caused by: Exception 'PDOException' with message 'could not find driver'

in /files/vendor/yiisoft/yii2/db/Connection.php:710

```

However, `pdo_mysql` is definitely installed.

Is anyone able to help me?