I understand what you are saying and I did do some research before posting here and I found that my PHP version should work fine with the nextcloud version and my phpinfo()
seems to work fine too, hence I don’t expect php to be the culprit (but I may be wrong). Now for the missing logs, I know that it’ll be very tricky but there is no data directory, what I have is:
$ ls -l /var/www/html/nextcloud/
total 148
drwxr-xr-x 41 http http 4096 Jul 18 08:24 3rdparty
-rw-r--r-- 1 http http 16522 Jun 5 06:17 AUTHORS
-rw-r--r-- 1 http http 34520 Jun 5 06:17 COPYING
drwxr-xr-x 44 http http 4096 Jul 18 08:25 apps
drwxr-xr-x 2 http http 4096 Jul 18 22:49 config
-rw-r--r-- 1 http http 3967 Jun 5 06:17 console.php
drwxr-xr-x 23 http http 4096 Jul 18 08:26 core
-rw-r--r-- 1 http http 5140 Jun 5 06:17 cron.php
-rw-r--r-- 1 http http 156 Jun 5 06:17 index.html
-rw-r--r-- 1 http http 2960 Jun 5 06:17 index.php
drwxr-xr-x 6 http http 4096 Jul 18 08:26 lib
-rwxr-xr-x 1 http http 283 Jun 5 06:17 occ
drwxr-xr-x 2 http http 4096 Jul 18 08:26 ocm-provider
drwxr-xr-x 2 http http 4096 Jul 18 08:26 ocs
drwxr-xr-x 2 http http 4096 Jul 18 08:26 ocs-provider
-rw-r--r-- 1 http http 3102 Jun 5 06:17 public.php
-rw-r--r-- 1 http http 5332 Jun 5 06:17 remote.php
drwxr-xr-x 4 http http 4096 Jul 18 08:26 resources
-rw-r--r-- 1 http http 26 Jun 5 06:17 robots.txt
-rw-r--r-- 1 http http 2379 Jun 5 06:17 status.php
drwxr-xr-x 3 http http 4096 Jul 18 08:26 themes
drwxr-xr-x 2 http http 4096 Jul 18 08:26 updater
-rw-r--r-- 1 http http 363 Jun 5 06:17 version.php
but I got the following in /var/log/httpd/error_log
:
[Sun Jul 19 09:23:29.328439 2020] [php7:warn] [pid 589] [client 192.168.1.222:44836] PHP Warning: fileperms(): stat failed for /var/www/html/nextcloud/data/nextcloud.log in /var/www/html/nextcloud/lib/private/Log/File.php on line 85
[Sun Jul 19 09:23:29.328694 2020] [php7:notice] [pid 589] [client 192.168.1.222:44836] {"reqId":"O38uZ9NnZG8rUxyvdfDe","level":3,"time":"2020-07-19T16:23:29+00:00","remoteAddr":"192.168.1.222","user":"--","app":"PHP","method":"GET","url":"/nextcloud/index.php","message":"fileperms(): stat failed for /var/www/html/nextcloud/data/nextcloud.log at /var/www/html/nextcloud/lib/private/Log/File.php#85","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.119 Safari/537.36","version":""}
[Sun Jul 19 09:23:29.328889 2020] [php7:notice] [pid 589] [client 192.168.1.222:44836] {"reqId":"O38uZ9NnZG8rUxyvdfDe","level":3,"time":"2020-07-19T16:23:29+00:00","remoteAddr":"192.168.1.222","user":"--","app":"index","method":"GET","url":"/nextcloud/index.php","message":{"Exception":"Doctrine\\\\DBAL\\\\DBALException","Message":"Failed to connect to the database: An exception occurred in driver: could not find driver","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":889,"function":"connect","class":"OC\\\\DB\\\\Connection","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/DB/Connection.php","line":194,"function":"executeQuery","class":"Doctrine\\\\DBAL\\\\Connection","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php","line":200,"function":"executeQuery","class":"OC\\\\DB\\\\Connection","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":216,"function":"execute","class":"Doctrine\\\\DBAL\\\\Query\\\\QueryBuilder","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppConfig.php","line":331,"function":"execute","class":"OC\\\\DB\\\\QueryBuilder\\\\QueryBuilder","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppConfig.php","line":109,"function":"loadConfigValues","class":"OC\\\\AppConfig","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppConfig.php","line":287,"function":"getApps","class":"OC\\\\AppConfig","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/App/AppManager.php","line":136,"function":"getValues","class":"OC\\\\AppConfig","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/App/AppManager.php","line":225,"function":"getInstalledAppsValues","class":"OC\\\\App\\\\AppManager","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/legacy/OC_Template.php","line":286,"function":"isEnabledForUser","class":"OC\\\\App\\\\AppManager","type":"->"},{"file":"/var/www/html/nextcloud/lib/base.php","line":268,"function":"printErrorPage","class":"OC_Template","type":"::"},{"file":"/var/www/html/nextcloud/lib/base.php","line":652,"function":"checkConfig","class":"OC","type":"::"},{"file":"/var/www/html/nextcloud/lib/base.php","line":1090,"function":"init","class":"OC","type":"::"},{"file":"/var/www/html/nextcloud/index.php","line":35,"args":["/var/www/html/nextcloud/lib/base.php"],"function":"require_once"}],"File":"/var/www/html/nextcloud/lib/private/DB/Connection.php","Line":67,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.119 Safari/537.36","version":""}
[Sun Jul 19 09:23:29.363334 2020] [php7:warn] [pid 589] [client 192.168.1.222:44836] PHP Warning: fileperms(): stat failed for /var/www/html/nextcloud/data/nextcloud.log in /var/www/html/nextcloud/lib/private/Log/File.php on line 85
[Sun Jul 19 09:23:29.363559 2020] [php7:notice] [pid 589] [client 192.168.1.222:44836] {"reqId":"O38uZ9NnZG8rUxyvdfDe","level":3,"time":"2020-07-19T16:23:29+00:00","remoteAddr":"192.168.1.222","user":"--","app":"PHP","method":"GET","url":"/nextcloud/index.php","message":"fileperms(): stat failed for /var/www/html/nextcloud/data/nextcloud.log at /var/www/html/nextcloud/lib/private/Log/File.php#85","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.119 Safari/537.36","version":""}
[Sun Jul 19 09:23:29.363735 2020] [php7:notice] [pid 589] [client 192.168.1.222:44836] {"reqId":"O38uZ9NnZG8rUxyvdfDe","level":3,"time":"2020-07-19T16:23:29+00:00","remoteAddr":"192.168.1.222","user":"--","app":"PHP","method":"GET","url":"/nextcloud/index.php","message":"chmod(): No such file or directory at /var/www/html/nextcloud/lib/private/Log/File.php#86","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.119 Safari/537.36","version":""}
and this in /var/log/httpd/access_log
:
192.168.1.222 - - [19/Jul/2020:09:25:17 -0700] "GET /nextcloud/index.php HTTP/1.1" 500 2301
192.168.1.222 - - [19/Jul/2020:09:25:18 -0700] "GET /nextcloud/core/img/favicon.ico HTTP/1.1" 200 3262
So after seeing stat failed for /var/www/html/nextcloud/data/nextcloud.log
, I created a data dir and touched a nextcloud.log
file within which I got:
{
"reqId":"oIu0pqhQvBDmG5MNy4Ai",
"level":3,
"time":"2020-07-19T16:27:42+00:00",
"remoteAddr":"192.168.1.222",
"user":"--",
"app":"index",
"method":"GET",
"url":"/nextcloud/index.php",
"message":{
"Exception":"Doctrine\\DBAL\\DBALException",
"Message":"Failed to connect to the database: An exception occurred in driver: could not find driver",
"Code":0,
"Trace":[
{
"file":"/var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php",
"line":889,
"function":"connect",
"class":"OC\\DB\\Connection",
"type":"->"
},
{
"file":"/var/www/html/nextcloud/lib/private/DB/Connection.php",
"line":194,
"function":"executeQuery",
"class":"Doctrine\\DBAL\\Connection",
"type":"->"
},
{
"file":"/var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php",
"line":200,
"function":"executeQuery",
"class":"OC\\DB\\Connection",
"type":"->"
},
{
"file":"/var/www/html/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line":216,
"function":"execute",
"class":"Doctrine\\DBAL\\Query\\QueryBuilder",
"type":"->"
},
{
"file":"/var/www/html/nextcloud/lib/private/AppConfig.php",
"line":331,
"function":"execute",
"class":"OC\\DB\\QueryBuilder\\QueryBuilder",
"type":"->"
},
{
"file":"/var/www/html/nextcloud/lib/private/AppConfig.php",
"line":109,
"function":"loadConfigValues",
"class":"OC\\AppConfig",
"type":"->"
},
{
"file":"/var/www/html/nextcloud/lib/private/AppConfig.php",
"line":287,
"function":"getApps",
"class":"OC\\AppConfig",
"type":"->"
},
{
"file":"/var/www/html/nextcloud/lib/private/App/AppManager.php",
"line":136,
"function":"getValues",
"class":"OC\\AppConfig",
"type":"->"
},
{
"file":"/var/www/html/nextcloud/lib/private/App/AppManager.php",
"line":225,
"function":"getInstalledAppsValues",
"class":"OC\\App\\AppManager",
"type":"->"
},
{
"file":"/var/www/html/nextcloud/lib/private/legacy/OC_Template.php",
"line":286,
"function":"isEnabledForUser",
"class":"OC\\App\\AppManager",
"type":"->"
},
{
"file":"/var/www/html/nextcloud/lib/base.php",
"line":268,
"function":"printErrorPage",
"class":"OC_Template",
"type":"::"
},
{
"file":"/var/www/html/nextcloud/lib/base.php",
"line":652,
"function":"checkConfig",
"class":"OC",
"type":"::"
},
{
"file":"/var/www/html/nextcloud/lib/base.php",
"line":1090,
"function":"init",
"class":"OC",
"type":"::"
},
{
"file":"/var/www/html/nextcloud/index.php",
"line":35,
"args":[
"/var/www/html/nextcloud/lib/base.php"
],
"function":"require_once"
}
],
"File":"/var/www/html/nextcloud/lib/private/DB/Connection.php",
"Line":67,
"CustomMessage":"--"
},
"userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.119 Safari/537.36",
"version":""
}{
"reqId":"oIu0pqhQvBDmG5MNy4Ai",
"level":3,
"time":"2020-07-19T16:27:42+00:00",
"remoteAddr":"192.168.1.222",
"user":"--",
"app":"PHP",
"method":"GET",
"url":"/nextcloud/index.php",
"message":"You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/html/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18",
"userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.119 Safari/537.36",
"version":""
}
And I guess the key is Failed to connect to the database: An exception occurred in driver: could not find driver
which is interesting as my phpinfo()
tells me about Modules:
- MySQL driver for PDO
- MySQLi
- MySQLnd
And mysqlnd has a larger section that reads:
mysqlnd |
enabled |
Version |
mysqlnd 7.4.8 |
Compression |
supported |
core SSL |
supported |
extended SSL |
supported |
Command buffer size |
4096 |
Read buffer size |
32768 |
Read timeout |
86400 |
Collecting statistics |
Yes |
Collecting memory statistics |
No |
Tracing |
n/a |
Loaded plugins |
mysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password,auth_plugin_caching_sha2_password,auth_plugin_sha256_password |
API Extensions |
no value |