Update 24.0.5.x -> 24.0.6.x "game changer concerning INVALID_HASH errors"

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 24.0.6.x
Operating system and version (eg, Ubuntu 20.04): ubuntu server 22.04.1
Apache or nginx version (eg, Apache 2.4.25): NGinx 1.23.1
PHP version (eg, 7.4): 8.1.9

The issue you are facing: using update script for updating nc in command line produces INVALID-HASH errors in /core /lib/private/Console/Application.php in /lib/base.php and /3rdparty/phpseclib…

Is this the first time you’ve seen this error? (Y/N): N (since Version 23.x no errors like this)

Steps to replicate it:

  1. upgrade NC via phpupdater on command line

sudo -u www-data php /var/www/nextcloud/updater/updater.phar
sudo -u www-data php /var/www/nextcloud/occ status
sudo -u www-data php /var/www/nextcloud/occ -V
sudo -u www-data php /var/www/nextcloud/occ db:add-missing-primary-keys
sudo -u www-data php /var/www/nextcloud/occ db:add-missing-indices
sudo -u www-data php /var/www/nextcloud/occ db:add-missing-columns
sudo -u www-data php /var/www/nextcloud/occ db:convert-filecache-bigint
sudo -u www-data php /var/www/nextcloud/occ maintenance:mimetype:update-db
sudo -u www-data php /var/www/nextcloud/occ maintenance:mimetype:update-js

  1. run … php occ integrity:check-core
  2. get errors over errors concerning “INVALID_HASH”

The output of your Nextcloud log in Admin > Logging:


The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):


The output of your Apache/nginx/system log in /var/log/____:



Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.


I know how to get rid of those errors generally following this instruction:

But something seems to be different during update from 24.0.5 to 24.0.6 compared to earlier updates.
Reproducable the /lib/base.php fails the integrity check when manipulating the php values for
max_execution_time and max_input_time

I figured out that there has been a gamechanger between version 24.0.4 and 24.0.5 but not affecting my replacement. Now with 24.0.6 the integrity check seems to be stronger with changes concerning /lib/base.php


NC 24.0.4

//try to configure php to enable big file uploads.
//this doesn´t work always depending on the web server and php configuration.
//Let´s try to overwrite some defaults anyway

  //try to set the maximum execution time to 60min
  if (strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
  @ini_set('max_execution_time', 'my_value');
  @ini_set('max_input_time', 'my_value');

now since NC 24.0.5 + 24.0.6.x

//try to configure php to enable big file uploads.
//this doesn´t work always depending on the webserver and php configuration.
//Let´s try to overwrite some defaults if they are smaller than 1 hour

  if (intval(@ini_get('max_execution_time') ?? 0) < 3600) {
  	@ini_set('max_execution_time', strval(3600));

  if (intval(@ini_get('max_input_time') ?? 0) < 3600) {
  	@ini_set('max_input_time', strval(3600));

OK i commented out the replacement for base.php that always change the value given by default (3600) with “my_values” (higher than 3600)

Not sure why it now is a problem for the integrity check with 24.0.6?

The other INVALID_HASH errors could be solved by downloading the latest bz2 file and extracting all needed folders / subfolders / files → copied to nextcloud dir and re-run the integrity:check-core.