Nextcloud version: 29.0.5
Operating system and version: Synology DSM 7.2.1-69057 Update 5
Apache or nginx version: Apache/2.4.58
PHP version: 8.2.21
The issue you are facing:
After I upgraded PHP 8.2, I now get an Internal Server Error when trying to access the Nextcloud instance.
Is this the first time you’ve seen this error? (Y/N):
Steps to replicate it:
- Update PHP 8.2 in DSM
- Try to connect to Nextcloud
The output of your Nextcloud log in Admin > Logging:
NO LOG OF THE ADMIN TAB SINCE IT ISN'T ACCESSIBLE
Output of internal log file:
Error core Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory at lib/private/DB/Connection.php 2024-09-11T09:32:27+00:00
line 167
0. 3rdparty/doctrine/dbal/src/Connection.php line 453
OC\DB\Connection->connect(
)
1. 3rdparty/doctrine/dbal/src/Connection.php line 411
Doctrine\DBAL\Connection->getDatabasePlatformVersion(
)
2. 3rdparty/doctrine/dbal/src/Connection.php line 318
Doctrine\DBAL\Connection->detectDatabasePlatform(
)
3. lib/private/DB/ConnectionAdapter.php line 200
Doctrine\DBAL\Connection->getDatabasePlatform(
)
4. lib/private/DB/QueryBuilder/QueryBuilder.php line 121
OC\DB\ConnectionAdapter->getDatabasePlatform(
)
5. lib/private/AppConfig.php line 1239
OC\DB\QueryBuilder\QueryBuilder->expr(
)
6. lib/private/AppConfig.php line 264
OC\AppConfig->loadConfig(false)
7. lib/private/legacy/OC_App.php line 736
OC\AppConfig->searchValues("installed_version")
8. lib/private/TemplateLayout.php line 237
OC_App::getAppVersions(
)
9. lib/private/legacy/OC_Template.php line 145
OC\TemplateLayout->__construct("error", "")
10. lib/private/Template/Base.php line 132
OC_Template->fetchPage(
)
11. lib/private/legacy/OC_Template.php line 320
OC\Template\Base->printPage(
)
12. remote.php line 88
OC_Template::printExceptionErrorPage(["Doctrine\\DBAL\\Exception"], 500)
13. remote.php line 174
handleException(["Doctrine\\DBAL\\Exception"])
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'instanceid' => 'IDENTIFIABLE INFORMATION',
'passwordsalt' => 'IDENTIFIABLE INFORMATION',
'secret' => 'IDENTIFIABLE INFORMATION',
'trusted_domains' =>
array (
0 => 'IDENTIFIABLE INFORMATION',
),
'datadirectory' => '/path/to/nextcloud/data',
'dbtype' => 'mysql',
'version' => '29.0.5.1',
'overwrite.cli.url' => 'IDENTIFIABLE INFORMATION',
'dbname' => 'nextcloud_database_name',
'dbhost' => 'localhost:3306',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'IDENTIFIABLE INFORMATION',
'dbpassword' => 'IDENTIFIABLE INFORMATION',
'installed' => true,
'memcache.local' => '\\OC\\Memcache\\APCu',
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'localhost',
'port' => '6379',
'timeout' => 0.0,
'password' => 'IDENTIFIABLE INFORMATION',
'dbindex' => 0,
),
'mail_smtpmode' => 'smtp',
'mail_smtpsecure' => 'ssl',
'mail_sendmailmode' => 'smtp',
'mail_from_address' => 'IDENTIFIABLE INFORMATION',
'mail_domain' => 'IDENTIFIABLE INFORMATION',
'mail_smtphost' => 'IDENTIFIABLE INFORMATION',
'mail_smtpauth' => 1,
'mail_smtpport' => 'IDENTIFIABLE INFORMATION',
'mail_smtpname' => 'IDENTIFIABLE INFORMATION',
'mail_smtppassword' => 'IDENTIFIABLE INFORMATION',
'default_phone_region' => 'IDENTIFIABLE INFORMATION',
'twofactor_enforced' => 'true',
'twofactor_enforced_groups' =>
array (
0 => 'IDENTIFIABLE INFORMATION',
),
'twofactor_enforced_excluded_groups' =>
array (
0 => 'admin',
),
'app_install_overwrite' =>
array (
0 => 'backup',
),
'opcache.memory_consumption' => 256,
'opcache.interned_strings_buffer' => 10,
'opcache.max_accelerated_files' => 100000,
'opcache.revalidate_freq' => 0,
'opcache.save_comments' => 1,
'activity_expire_days' => 30,
'maintenance' => false,
'theme' => '',
'loglevel' => 2,
'maintenance_window_start' => 1,
);
The output of your Apache/nginx/system log in /var/log/____
:
No log files available
I made sure that the Apache 2.4 is running, Redis as well and the database is manually reachable as well.
Any ideas on how to fix this issue?