Nextcloud version (eg, 20.0.5): 24.0.6
Operating system and version (eg, Ubuntu 20.04): Debian 10
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.38
PHP version (eg, 7.4): 8.1
The issue you are facing:
I get the internal server error page from nextcloud after upgrading from PHP 7.4 to 8.1.
The output of your Nextcloud log in Admin > Logging:
{"reqId":"jeaLwinQGCzCh5QeUyWZ","level":3,"time":"2022-10-24T18:26:42+00:00","remoteAddr":"***","user":"--","app":"index","method":"GET","url":"/","message":"Configuration was not read or initialized correctly, not overwriting /var/www/nextcloud/config/config.php","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36","version":"","exception":{"Exception":"OCP\\HintException","Message":"Configuration was not read or initialized correctly, not overwriting /var/www/nextcloud/config/config.php","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Config.php","line":143,"function":"writeData","class":"OC\\Config","type":"->"},{"file":"/var/www/nextcloud/lib/private/SystemConfig.php","line":142,"function":"setValue","class":"OC\\Config","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Util.php","line":906,"function":"setValue","class":"OC\\SystemConfig","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":427,"function":"getInstanceId","class":"OC_Util","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":666,"function":"initSession","class":"OC","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1111,"function":"init","class":"OC","type":"::"},{"file":"/var/www/nextcloud/index.php","line":34,"args":["/var/www/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Config.php","Line":258,"Hint":"Configuration was not read or initialized correctly, not overwriting /var/www/nextcloud/config/config.php","CustomMessage":"--"}}
{"reqId":"jeaLwinQGCzCh5QeUyWZ","level":3,"time":"2022-10-24T18:26:42+00:00","remoteAddr":"***","user":"--","app":"index","method":"GET","url":"/","message":"Failed to connect to the database: An exception occurred in the driver: could not find driver","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36","version":"","exception":{"Exception":"Doctrine\\DBAL\\Exception","Message":"Failed to connect to the database: An exception occurred in the driver: could not find driver","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1519,"function":"connect","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1041,"function":"getWrappedConnection","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":345,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":281,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":411,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":176,"function":"loadConfigValues","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppConfig.php","line":367,"function":"getApps","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":127,"function":"getValues","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":216,"function":"getInstalledAppsValues","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":286,"function":"isEnabledForUser","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/nextcloud/index.php","line":44,"function":"printErrorPage","class":"OC_Template","type":"::"}],"File":"/var/www/nextcloud/lib/private/DB/Connection.php","Line":139,"CustomMessage":"--"}}
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'instanceid' => ***,
'passwordsalt' => ***,
'secret' => ***,
'trusted_domains' =>
array (
0 => ***,
1 => ***,
),
'datadirectory' => '/var/www/nextcloud/data',
'overwrite.cli.url' => ***,
'dbtype' => 'mysql',
'version' => '24.0.6.1',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'nextcloud',
'dbpassword' => ***,
'installed' => true,
'maintenance' => false,
'theme' => '',
"log_type" => "file",
"logfile" => "nextcloud.log",
"loglevel" => 4,
"logdateformat" => "F d, Y H:i:s",
'updater.release.channel' => 'stable',
'mysql.utf8mb4' => true,
'updater.secret' => ***,
'memcache.local' => '\\OC\\Memcache\\APCu',
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'localhost',
'port' => 6379,
),
'mail_smtpmode' => 'smtp',
'mail_smtpsecure' => 'tls',
'mail_sendmailmode' => 'smtp',
'mail_from_address' => ***,
'mail_domain' => 'live.de',
'mail_smtpauth' => 1,
'mail_smtpauthtype' => 'LOGIN',
'mail_smtphost' => 'smtp-mail.outlook.com',
'mail_smtpport' => '587',
'mail_smtpname' => ***,
'mail_smtppassword' => ***,
'default_phone_region' => 'DE',
);