Upgrading from 14.04 to 15.0

Nextcloud version (eg, 12.0.2): 15.0.0
Operating system and version (eg, Ubuntu 17.04): Ubuntu 18.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.25
PHP version (eg, 7.1): PHP 7.2.13

The issue you are facing:

When upgrading from 14.04 to 15.0 everything went well but now i cannot access my files due to this error:

[php7:notice] [pid 27] [client 172.18.0.1:33346] PHP Notice: Undefined offset: 1 in /var/www/html/lib/base.php on line 1059

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Have Nextcloud version 14.04
  2. Upgrade to 15.0
  3. Confirm update on welcome screen

The output of your Nextcloud log in Admin > Logging:
- Cannot aceess -

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

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => true,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'instanceid' => 'ID',
  'passwordsalt' => 'SALT',
  'secret' => 'SECRET',
  'trusted_domains' => 
  array (
    0 => 'cloud.example.com',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '15.0.0.10',
  'overwrite.cli.url' => 'https://cloud.example.com',
  'overwritehost' => 'cloud.example.com',
  'dbname' => 'nextcloud',
  'dbhost' => 'nx-database',
  'dbport' => '3306',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'PASSWORD',
  'mysql.utf8mb4' => true,
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtphost' => 'SMTPHOST',
  'mail_smtpport' => '587',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_from_address' => 'cloud',
  'mail_domain' => 'example.com',
  'mail_smtpname' => 'USERNAME',
  'mail_smtppassword' => 'PASSWORD',
  'mail_smtpsecure' => 'tls',
  'theme' => '',
  'loglevel' => 2,
  'maintenance' => false,
);

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

172.18.0.1 - - [15/Dec/2018:12:38:59 +0000] "GET / HTTP/1.1" 302 1459 "-" "curl/7.62.0"                                              
172.18.0.1 - - [15/Dec/2018:12:40:01 +0000] "GET / HTTP/1.1" 302 1461 "-" "curl/7.62.0"                                              
172.18.0.1 - - [15/Dec/2018:12:40:01 +0000] "GET /login HTTP/1.1" 200 3453 "-" "curl/7.62.0"                                         
[Sat Dec 15 12:40:02.620362 2018] [php7:notice] [pid 33] [client 172.18.0.1:33880] PHP Notice:  Undefined offset: 1 in /var/www/html/
lib/base.php on line 1059                                                                                                            
172.18.0.1 - - [15/Dec/2018:12:40:02 +0000] "HEAD /login HTTP/1.1" 200 1262 "-" "Go-http-client/1.1"                                 
172.18.0.1 - - [15/Dec/2018:12:41:03 +0000] "GET / HTTP/1.1" 302 1461 "-" "curl/7.62.0"                                              
172.18.0.1 - - [15/Dec/2018:12:41:03 +0000] "GET /login HTTP/1.1" 200 3455 "-" "curl/7.62.0"                                         
[Sat Dec 15 12:41:22.621985 2018] [php7:notice] [pid 32] [client 172.18.0.1:34052] PHP Notice:  Undefined offset: 1 in /var/www/html/
lib/base.php on line 1059                                                                                                            
172.18.0.1 - - [15/Dec/2018:12:41:22 +0000] "HEAD /login HTTP/1.1" 200 1270 "-" "Go-http-client/1.1"                                 
172.18.0.1 - - [15/Dec/2018:12:42:04 +0000] "GET / HTTP/1.1" 302 1459 "-" "curl/7.62.0"                                              
[Sat Dec 15 12:43:02.616482 2018] [php7:notice] [pid 27] [client 172.18.0.1:34254] PHP Notice:  Undefined offset: 1 in /var/www/html/
lib/base.php on line 1059                                                                                                            
172.18.0.1 - - [15/Dec/2018:12:43:02 +0000] "HEAD /login HTTP/1.1" 200 1264 "-" "Go-http-client/1.1"                                 
172.18.0.1 - - [15/Dec/2018:12:43:06 +0000] "GET / HTTP/1.1" 302 1455 "-" "curl/7.62.0"                                              
[Sat Dec 15 12:43:22.619683 2018] [php7:notice] [pid 33] [client 172.18.0.1:34292] PHP Notice:  Undefined offset: 1 in /var/www/html/
lib/base.php on line 1059

As a note, i am using the docker image with an nginx reverse proxy.

How did you preform the upgrade? and what steps did you take?

I upgraded it via the docker way:

  1. Pull new image
  2. Re-build container
  3. Run web upgrade

Retry via OCC

cd /usr/share/nginx/cloud/
sudo -u www-data php occ check
sudo -u www-data php occ app:update
sudo -u www-data php occ upgrade

Once this is done, then run

sudo -u www-data php occ db:add-missing-indices
sudo -u www-data php occ db:convert-filecache-bigint
sudo -u www-data php occ files:scan --all

sudo -u www-data sed -i "s/upload_max_filesize=.*/upload_max_filesize=10240M/" /usr/share/nginx/cloud/.user.ini
sudo -u www-data sed -i "s/post_max_size=.*/post_max_size=10240M/" /usr/share/nginx/cloud/.user.ini
sudo -u www-data sed -i "s/output_buffering=.*/output_buffering='Off'/" /usr/share/nginx/cloud/.user.ini
service php7.2-fpm restart && service redis-server restart && service nginx restart

This part was enough to fix it, thanks!

Glad I cloud help :slight_smile:

Hi @elbayedhamza,

I think your two sed commands regarding upload_max and post_max are missing the star * in the regex and might result in misconfiguration. Could you check that again and correct the command if necessary? I’ll mark your post as solution then.

You are absolutely correct, I had the star there, but for some reason its not showing in the preview, could be because of the formatting of the forum… I had to make the * italic in order for it to show lol

Thanks for pointing it out :sweat_smile:

Hi @elbayedhamza

You can define the text as code and I just edited your text showing the commands as code.
There are two methods.

`with single back tick`
\```
With triple back ticks in it's own line. Only without the backslashes. I only needed to add them, to make the back ticks visible.
\```

Hi Schmu,
Thanks buddy :smiley:

hey elbayedhamza,
you ssem to know a lot about this maybe you can help me out?
I updated my nc to 15 as well. In the settings page it shows the recoomodation to perform “occ db:convert-filecache-bigint”. But I don’t know what that means and how I can fix this. I am running a webhosted server at netcup.de. I looked in the web but all the given solutions are helpless to me. I’m a total beginner.
yours, grafsimeon