Header error when using the updater

Hi,

I am trying to update from 10.0.3 to 11. I have a notification in the top right indicating an update is available but when I follow the link it takes me to the admin page with the following security and setup errors.

Do I need to resolve these errors before the updater app will work?

Thank you for the help!

The updater will work fine without doing something about the warnings. But indeed you should do something about it, whether you upgrade or not:

  • The first is relevant for security. Just follow the link, it’s an easy fix in your nextcloud vhost/webserver config.
  • Second is relevant for performance. Follow the link, which will advice/guide to install APCu for memory caching and Redis for file locking.

Thank you very much! I managed to do the update using the updater app by following the post here:

However it seems the database was not updated. Is it now recommended to rollback the installation?

Why you think the database was not updated? As upgrading from 10.0.3 to 11 is absolutely supported there should not be any problem. If some problem occurs for you, please provide some more details, so we should be able to fix it.

Did it ask you to run an occ upgrade command on the CLI? If not and you ran through the entire upgrade in the browser (inc DB steps) you should be fine.

I had a file to view phpinfo in the previous installation and it came up as an error (unrecognized file). I removed the file and retried the installation. The installation was done completely through the updater app. When I retried I was asked to create a new admin and user. I went to the admin pg and retried the installation with it running correctly this time. I logged in and no data or users from v10 are present.

I am VERY new to this so please excuse any explanations I might have left out.

Thank you for the help.

Welp. Something happened to your config.php I’d assume. I don’t recall offhand where, but as part of the upgrade the script creates a backup of your install, then moves things back at the end. It could well be all you need to do is manually move the data folder and the config.php file back to where they belong (/path/to/nextcloud/data and /path/to/nextcloud/config/config.php)

Edit, relevant part of the updater script:

* Creates a backup of all files and moves it into data/updater-$instanceid/backups/nextcloud-X-Y-Z/

So, in your data folder, can you locate the folder updater-somestring/backups/nextcloud/10.0.3/?

Also in your data folder (ls -la /path/to/nextcloud/data) do you see usernames?

This is interesting. The config.php being removed already happened here: Deleted config.php (by nextcloud installation script?), panic! 😱

I did not find some reason in both topics why this could happen. But as Jason already mentioned, try to find the backup and otherwise create a default config.php and redo your adjustments to it as mentioned in the topic linked above.

Hello.

When I lost config.php I remade it using this template:

<?php
$CONFIG = array (
  'instanceid' => 'ID',
  'passwordsalt' => 'PASSWORDSALT',
  'secret' => 'SECRET',
  'trusted_domains' => 
  array (
    0 => 'YOURDOMAIN',
  ),
  'datadirectory' => 'DATADIRECTORY',
  'overwrite.cli.url' => 'CLIURL',
  'dbtype' => 'mysql',
  'dbname' => 'DATABASENAME',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'USER',
  'dbpassword' => 'PASSWORD',
  'logtimezone' => 'UTC',
  'installed' => true,
  'theme' => '',
);

The words in capital letters must be changed to match your installation:

  • ‘instanceid’, ‘passwordsalt’, ‘secret’ should be set in your “wrong” config.php and you may use them. As far as I know you can’t create them by your own, but the installation script should create them for you.
  • ‘trusted_domains’: you must write here your nextcloud’s URL without http or https (www.mynextcloudinstallation.org for example)
  • ‘datadirectory’: this is the place where your user files are. In a linux server (mine is ubuntu) is in /var/www/html/nextcloud/data or something like that.
  • ‘overwrite.cli.url’: full nextcloud’s URL with http or https -> https://www.mynextcloudinstallation.org for example
  • ‘dbname’, ‘dbuser’ and ‘dbpassword’: they must match the existing database name, database user and password from your previous installation. Your users and reference to files in data folder are in that database.

You may need to change ‘dbtype’, ‘dbhost’, ‘dbport’ and ‘dbtableprefix’ if you made an uncommon installation, but I don’t think so.

Hope it helps.

1 Like