[RESOLVED] Ubuntu 18.04.1 upgrade messed with my Nextcloud install

I originally started out running Owncloud and was very happy with it. I was using the Owncloud PPA repo. When Nextcloud came out, I followed the instructions to upgrade from Owncloud to Nextcloud, and IT WORKED. I have been happily upgrading since then, and am now on 13.0.5. This morning I decided to upgrade my server from Ubuntu 16.04.5 to 18.04.1.

This upgrade seemed to be going pretty smoothly, then I saw something that immediately made me go “oh oh!”. The Ubuntu upgrade attempted to uninstall the Owncloud deb I installed way back when, which, of course, completely hosed Nextcloud.

Here is what I am seeing when I go into my Nextcloud URL:


Is the fix for this as easy as just extracting Nextcloud on top of the existing files?

make a backup the nextcloud www directory and give it a try. at least make sure that config/config.php is not overwriten.

i would also make a database dump. :wink:

Looks like php was not installed properly, it changed from php5 to php7. Check out the requirements and install manually all php7-* packages you need. Don’t forget to activate php (apache: a2enmod php7) and restart your webserver. Check the webserver logs.

Got the extract done. Got php 7.2 setup. This is my error now:

Looks like it’s permissions now. Time to go mop up.

EDIT: It’s back!

Had it install php-mbstring and add +x permissions to Application.php and it fired up and I could log in.

Thank you everyone for the help!

1 Like

@apastuszak cool for you.

Please; mark thread as solved.

I have the same problem after upgrading from Ubuntu 16.04 to 18.04, where is the Application.php file located? I’m a linux noob my apologies in advance.

Here is the result navigating to my nextcloud site:

  • @author Joas Schilling * @author Jörn Friedrich Dreyer * @author Lukas Reschke * @author Morris Jobke * @author Robin Appelman * @author Sergio Bertolín * @author Thomas Müller * @author Vincent Petry * * @license AGPL-3.0 * * This code is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License, version 3, * along with this program. If not, see * */ require_once DIR . ‘/lib/versioncheck.php’; try { require_once DIR . ‘/lib/base.php’; OC::handleRequest(); } catch(\OC\ServiceUnavailableException $ex) { \OC::$server->getLogger()->logException($ex, array(‘app’ => ‘index’)); //show the user a detailed error page OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE); OC_Template::printExceptionErrorPage($ex); } catch (\OC\HintException $ex) { OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE); try { OC_Template::printErrorPage($ex->getMessage(), $ex->getHint()); } catch (Exception $ex2) { \OC::$server->getLogger()->logException($ex, array(‘app’ => ‘index’)); \OC::$server->getLogger()->logException($ex2, array(‘app’ => ‘index’)); //show the user a detailed error page OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); OC_Template::printExceptionErrorPage($ex); } } catch (\OC\User\LoginException $ex) { OC_Response::setStatus(OC_Response::STATUS_FORBIDDEN); OC_Template::printErrorPage($ex->getMessage(), $ex->getMessage()); } catch (Exception $ex) { \OC::$server->getLogger()->logException($ex, array(‘app’ => ‘index’)); //show the user a detailed error page OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); OC_Template::printExceptionErrorPage($ex); } catch (Error $ex) { try { \OC::$server->getLogger()->logException($ex, array(‘app’ => ‘index’)); } catch (Error $e) { $claimedProtocol = strtoupper($_SERVER[‘SERVER_PROTOCOL’]); $validProtocols = [ ‘HTTP/1.0’, ‘HTTP/1.1’, ‘HTTP/2’, ]; $protocol = ‘HTTP/1.1’; if(in_array($claimedProtocol, $validProtocols, true)) { $protocol = $claimedProtocol; } header($protocol . ’ 500 Internal Server Error’); header(‘Content-Type: text/plain; charset=utf-8’); print(“Internal Server Error\n\n”); print(“The server encountered an internal error and was unable to complete your request.\n”); print(“Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.\n”); print(“More details can be found in the webserver log.\n”); throw $e; } OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); OC_Template::printExceptionErrorPage($ex); }

For me, It worked by doing the php update before distribution update.

To say this I had to spend long hours on multiple rollback to backup snapshot.
So if you’re not sure, DO A BACKUP

What worked best was to install php7.2 before do-release-upgrade to 18.04.
sudo apt-get install php7.2-common

Then disabled the current version 7.0
sudo a2dismod php7.0

Enabled 7.2:
sudo a2enmod php7.2

Restarted apache
sudo service restart apache2

Checked on myownwebsite.com/nextcloud/

It happened several php7.2 packages were missing (personal website on but nextcloud off)
sudo apt-get dist-upgrade

Restarted apache another time
sudo service restart apache2
Checked on my mysite.com/nextcloud/-> it finally worked

Then I proceeded to 18.04 upgrade
sudo do-release-upgrade

I was prompted about overwriting apache2.conf parameters and I answered No, however I assumed it would not make any difference

Apache php7.2 was working right after 18.04 update’s first reboot.

ps: /var/www/nextcloud/core/Application.php was not changed to +x

I did the upgrade first, and started to look help after it didn’t worked. Thanks to @lokinou I got to good tracks, and got it fixed, as documented in the other thread

Which Application.php do you granted +x perms?