Closed DanielB1990 closed 4 years ago
Best guess: Something in your new config.php breaks. 'dbport' => '',
could be missing.
- DO NOT COMPLETELY BASE YOUR CONFIGURATION FILE ON THIS SAMPLE. THIS MAY BREAK
- YOUR INSTANCE. Instead, manually copy configuration switches that you
- consider important for your instance to your working
config.php
, and- apply configuration options that are pertinent for your instance.
Closing as configuration issue. Feel free to use config.sample.php
as start for your configuration issue. Not my business but don't report issues here if you do exactly the opposite as suggested and something does not work then. Please ask any configuration related questions at https://help.nextcloud.com/ as GitHub is used to track bugs.
To give some background information, I was still on version 16.0.5 and since I had issues, I thought updating would be a good choice, I used Upgrade manually to do so, but currently something with the database connection seems to be the problem.
Steps to reproduce
Visit https://cloud.danielenrianka.nl/index.php
Expected behaviour
I should see the login screen and be able to login.
Actual behaviour
Strange thing is, the values are correct, as shown with https://cloud.danielenrianka.nl/connectieTestMySQLi.php which is:
PHP File
``` '.PHP_EOL; echo 'Debugging errno: ' . mysqli_connect_errno().''.PHP_EOL; echo 'Debugging error: ' . mysqli_connect_error().'
'.PHP_EOL; exit; } echo 'Success: A proper connection to MySQL was made!
' . PHP_EOL; echo 'Host information: ' . mysqli_get_host_info($link).'
' . PHP_EOL; $data = mysqli_query($link, "SELECT * FROM `oc_appconfig` LIMIT 5;"); while($row = mysqli_fetch_array($data)) { echo ' '; } mysqli_close($link); ```
Server configuration
Operating system: Ubuntu
Web server: Apache/2.4.18
Database: MySQL 5.7.30
PHP version: PHP 7.3.20
Nextcloud version: 19.0.1
Updated from an older Nextcloud/ownCloud or fresh install: Manually from 16.0.5
Where did you install Nextcloud from: https://nextcloud.com/install/#instructions-server > Archive file
Signing status: N/A due to "Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002]".
List of activated apps: N/A due to "Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002]".
Nextcloud configuration:
Config report - NEW
``` 'd3c944a9a', */ 'instanceid' => 'ocx93xf6p6ja', /** * The salt used to hash all passwords, auto-generated by the Nextcloud * installer. (There are also per-user salts.) If you lose this salt you lose * all your passwords. This example is for documentation only, and you should * never use it. * * @deprecated This salt is deprecated and only used for legacy-compatibility, * developers should *NOT* use this value for anything nowadays. * * 'passwordsalt' => 'd3c944a9af095aa08f', */ 'passwordsalt' => 'XXXXX', /** * Your list of trusted domains that users can log into. Specifying trusted * domains prevents host header poisoning. Do not remove this, as it performs * necessary security checks. * You can specify: * * - the exact hostname of your host or virtual host, e.g. demo.example.org. * - the exact hostname with permitted port, e.g. demo.example.org:443. * This disallows all other ports on this host * - use * as a wildcard, e.g. ubos-raspberry-pi*.local will allow * ubos-raspberry-pi.local and ubos-raspberry-pi-2.local * - the IP address with or without permitted port, e.g. [2001:db8::1]:8080 * Using TLS certificates where commonName=Config report - BEFORE
``` 'ocx93xXXXX', 'passwordsalt' => 'XXXXX', 'secret' => 'XXXXX', 'trusted_domains' => array ( 0 => 'cloud.danielenrianka.nl', ), 'datadirectory' => '/var/www/vhosts/danielenrianka.nl/httpdocs_cloud/data', 'overwrite.cli.url' => 'https://cloud.danielenrianka.nl', 'dbtype' => 'mysql', 'version' => '16.0.5.1', 'dbname' => 'denr_cloud', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => 'denr_cloud', 'dbpassword' => 'XXXXX', 'installed' => true, 'maintenance' => false, 'theme' => '', 'loglevel' => 2, 'mail_smtpmode' => 'smtp', 'mail_smtpsecure' => 'ssl', 'mail_sendmailmode' => 'smtp', 'mail_from_address' => 'cloud', 'mail_domain' => 'danielenrianka.nl', 'mail_smtpauthtype' => 'LOGIN', 'mail_smtpauth' => 1, 'mail_smtphost' => 'mailhost.dbwebdiensten.nl', 'mail_smtpport' => '465', 'mail_smtpname' => 'cloud@danielenrianka.nl', 'mail_smtppassword' => 'XXXXX', ); ```Are you using external storage, if yes which one: None
Are you using encryption: No
Are you using an external user-backend, if yes which one: No
Client configuration
Browser: Firefox / Chrome
Operating system: Windows 10 & Xubuntu 20
Logs
Web server error log
None
Nextcloud log (data/nextcloud.log)
Nextcloud log
``` { "reqId": "XxMP6C4EPlYAXXXX", "level": 3, "time": "July 18, 2020 17:06:16", "remoteAddr": "94.213.151.X", "user": "--", "app": "core", "method": "GET", "url": "/index.php", "message": { "Exception": "Doctrine\\DBAL\\DBALException", "Message": "Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] ", "Code": 0, "Trace": [{ "file": "/var/www/vhosts/danielenrianka.nl/httpdocs_cloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php", "line": 889, "function": "connect", "class": "OC\\DB\\Connection", "type": "->", "args": [] }, { "file": "/var/www/vhosts/danielenrianka.nl/httpdocs_cloud/lib/private/DB/Connection.php", "line": 194, "function": "executeQuery", "class": "Doctrine\\DBAL\\Connection", "type": "->", "args": ["SELECT * FROM `oc_appconfig`", [], [], null ] }, { "file": "/var/www/vhosts/danielenrianka.nl/httpdocs_cloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php", "line": 200, "function": "executeQuery", "class": "OC\\DB\\Connection", "type": "->", "args": ["SELECT * FROM `oc_appconfig`", [], [] ] }, { "file": "/var/www/vhosts/danielenrianka.nl/httpdocs_cloud/lib/private/DB/QueryBuilder/QueryBuilder.php", "line": 216, "function": "execute", "class": "Doctrine\\DBAL\\Query\\QueryBuilder", "type": "->", "args": [] }, { "file": "/var/www/vhosts/danielenrianka.nl/httpdocs_cloud/lib/private/AppConfig.php", "line": 331, "function": "execute", "class": "OC\\DB\\QueryBuilder\\QueryBuilder", "type": "->", "args": [] }, { "file": "/var/www/vhosts/danielenrianka.nl/httpdocs_cloud/lib/private/AppConfig.php", "line": 109, "function": "loadConfigValues", "class": "OC\\AppConfig", "type": "->", "args": [] }, { "file": "/var/www/vhosts/danielenrianka.nl/httpdocs_cloud/lib/private/AppConfig.php", "line": 287, "function": "getApps", "class": "OC\\AppConfig", "type": "->", "args": [] }, { "file": "/var/www/vhosts/danielenrianka.nl/httpdocs_cloud/lib/private/legacy/OC_App.php", "line": 883, "function": "getValues", "class": "OC\\AppConfig", "type": "->", "args": [false, "installed_version"] }, { "file": "/var/www/vhosts/danielenrianka.nl/httpdocs_cloud/lib/private/TemplateLayout.php", "line": 164, "function": "getAppVersions", "class": "OC_App", "type": "::", "args": [] }, { "file": "/var/www/vhosts/danielenrianka.nl/httpdocs_cloud/lib/private/legacy/OC_Template.php", "line": 185, "function": "__construct", "class": "OC\\TemplateLayout", "type": "->", "args": ["error", ""] }, { "file": "/var/www/vhosts/danielenrianka.nl/httpdocs_cloud/lib/private/Template/Base.php", "line": 132, "function": "fetchPage", "class": "OC_Template", "type": "->", "args": [] }, { "file": "/var/www/vhosts/danielenrianka.nl/httpdocs_cloud/lib/private/legacy/OC_Template.php", "line": 334, "function": "printPage", "class": "OC\\Template\\Base", "type": "->", "args": [] }, { "file": "/var/www/vhosts/danielenrianka.nl/httpdocs_cloud/index.php", "line": 63, "function": "printExceptionErrorPage", "class": "OC_Template", "type": "::", "args": [{ "__class__": "Doctrine\\DBAL\\DBALException" }, 500] }], "File": "/var/www/vhosts/danielenrianka.nl/httpdocs_cloud/lib/private/DB/Connection.php", "Line": 67, "CustomMessage": "--" }, "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0", "version": "" } ```