SQLSTATE[HY000]: General error: 1 no such table... | Could not detect any host in

Hello.

I recently installed Nextcloud in a shared hosting server and everything went smoothly, but I then decided to create a test lab at home to experiment stuff before attempting to implement things in the public server and I get a problem immediately when attempting to install.

I initially tried to install using MySQL / MariaDB, but since that wasn’t working I decided to go with SQLite until I can find out the issue, suffice to say that it fails all the same.

The error I get in the browser, after pressing install, is the following:
SQLSTATE[HY000]: General error: 1 no such table: oc_users

If I press install a second time (or third, etc), only the table name changes:
SQLSTATE[HY000]: General error: 1 no such table: oc_appconfig

The config.php file was generated in the config folder. In the data folder there are now the SQLi database file owncloud.db and logfile nextcloud.log. The SQLi database only has a table named oc_migrations, but no rows. The log file nextcloud.log contents are as follows:

{"reqId":"3QhhcNXRcwkDFLs7BQAI","level":2,"time":"2023-03-19T01:03:09+00:00","remoteAddr":"192.168.1.131","user":"--","app":"no app in context","method":"POST","url":"/nextcloud/index.php","message":"Could not detect any host in http:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0","version":"","data":[]}
{"reqId":"3QhhcNXRcwkDFLs7BQAI","level":2,"time":"2023-03-19T01:03:09+00:00","remoteAddr":"192.168.1.131","user":"--","app":"no app in context","method":"POST","url":"/nextcloud/index.php","message":"Could not detect any host in https:///nextcloud/data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0","version":"","data":[]}

Immediately I can see that there is no IP or hostname, after the protocol, in the messages logged, but looking at access.log from Apache I get this:

192.168.1.131 - - [19/Mar/2023:01:03:09 +0000] "POST /nextcloud/index.php HTTP/1.1" 200 7177 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.131 - - [19/Mar/2023:01:03:10 +0000] "GET /core/img/app-background.jpg HTTP/1.1" 404 299 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"

The 404 error above on the background image is intriguing, instead of directing to the nextcloud subfolder, it is specifically trying to get the resource from the root folder, which is obviously not the correct path. That may be a hint, but at this moment I don’t know what to make of it and it only seems to pertain to visual resources under /core/img/

The config.php file is as follows:

<?php
$CONFIG = array (
  'instanceid' => 'oc33wrpk8sdl',
  'passwordsalt' => 'r1BX3udl4EZF1J43b1ZIKvSK/1WjFB',
  'secret' => 'Llm/rvsHBjSzMujd2xfbYy7m9VDuEfXcYIREF6fRtoN9M6k0',
  'trusted_domains' => 
  array (
    0 => '192.168.1.66',
  ),
  'datadirectory' => 'C:/xampp/htdocs/nextcloud/data',
  'dbtype' => 'sqlite3',
  'version' => '25.0.4.1',
  'overwrite.cli.url' => 'http://192.168.1.66/nextcloud',
);

If you look at the data directory in the config file you’ll notice that this is a Windows system. I’m using XAMPP, which is a package that bundles Apache, MySQL, PHP, etc. That may be part of the problem, but unfortunately Nextcloud doesn’t make it clear what the actual issue is, or at least it isn’t apparent to me, hence this topic.

Although Windows does not fit the criteria for the typical system requirements, I assumed that I could try and debug each error or install each dependency as needed, but unfortunately there’s little to go on. My environment consists of Apache v2.4.54 and PHP v8.1.12.

I appreciate if someone can give me some tips or suggestions on how to diagnose the issue.

Thank you!

Since Nextcloud Server does not support Microsoft Windows, you are on your own.

1 Like