Upgrading to 3.6 Impossible With PHP 8 Installed 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:

PHP 7.1 was too low to upgrade Craft from 3.5 to 3.6.
Craft 3.5 does not support PHP 8, so I cannot use PHP 8 to upgrade to 3.6 either.
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.
Unfortunately, I get the following error whenever I try to run php7.4 craft upgrade all:

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

    - craft 3.5.18 =&gt; 3.6.4.1
    - campaign 1.18.1 =&gt; 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 &quot;'/files/craft' 'migrate/all' '--no-backup' '--no-content'&quot; 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 &quot;curl&quot; 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?
So probably the best thing you can be doing is doing your updates locally, testing them, and then pushing them to the production environment.
You can read more about it in the Updating Craft CMS without Headaches article.
You still have the opportunity to do this here... get a local dev environment set up, pull down your code and database, then get it up and running on a PHP version such as PHP 7.4 that will work with older versions of Craft as well as Craft 3.6.
Then do the update locally, and deploy the update to your production server.