Upgrade to 10.4.0.4 on Ubuntu 16.04.6 LTS

hello all,

I make an upgrade of the “owncloud-files” on my server this day.

I needed to upgrade to php-7.1.

But now, when i go to my website, i got this text :

    • @copyright Copyright © 2018, ownCloud GmbH * @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 * */ // Show warning if a PHP version below 7.1.0 is used, this has to happen here // because base.php will already use 7.1 syntax. if (\version_compare(PHP_VERSION, ‘7.1.0’) === -1) { echo 'This version of ownCloud requires at least PHP 7.1.0
      '; echo 'You are currently running PHP ’ . PHP_VERSION . ‘. Please update your PHP version.’; return; } // Show warning if PHP 7.4 or later is used as ownCloud is not compatible with PHP 7.4 if (\version_compare(PHP_VERSION, ‘7.4.0alpha1’) !== -1) { echo 'This version of ownCloud is not compatible with PHP 7.4
      '; echo 'You are currently running PHP ’ . PHP_VERSION . ‘.’; return; } // running oC on Windows is unsupported since 8.1, this has to happen here because // is seems that the autoloader on Windows fails later and just throws an exception. if (\stripos(PHP_OS, ‘WIN’) === 0) { echo ‘ownCloud Server does not support Microsoft Windows.’; return; } try { require_once DIR . ‘/lib/base.php’; OC::handleRequest(); } catch (\OC\ServiceUnavailableException $ex) { \OC::$server->getLogger()->logException($ex, [‘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); OC_Template::printErrorPage($ex->getMessage(), $ex->getHint()); } catch (\OC\User\LoginException $ex) { OC_Response::setStatus(OC_Response::STATUS_FORBIDDEN); OC_Template::printErrorPage($ex->getMessage()); } catch (\OCP\Files\ForbiddenException $ex) { OC_Response::setStatus(OC_Response::STATUS_FORBIDDEN); OC_Template::printErrorPage($ex->getMessage()); } catch (\Throwable $ex) { try { \OC::$server->getLogger()->logException($ex, [‘app’ => ‘index’]); //show the user a detailed error page OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); OC_Template::printExceptionErrorPage($ex); } catch (\Throwable ex2) { // with some env issues, it can happen that the logger couldn't log properly, // so print out the exception directly // NOTE: If we've reached this point, something has gone really wrong because // we couldn't even get the logger, so don't rely on ownCloud here. \header("{_SERVER[‘SERVER_PROTOCOL’]} 599 Broken"); \OC::crashLog($ex); \OC::crashLog($ex2); } }

Deinstall php7.0 and install a newer one? I moved to php7.2. which versions provide you ubuntu repo?

1 Like

I installed the php-7.1.

occ work for me in command-line.

but the website give me only a text page.

what does php --version show?
have you uninstalled php7.0 before?
have you installed all necessary 7.1 packages e.g. apache mod?.

1 Like

PHP 7.1.33-14+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Mar 20 2020 13:57:17) ( NTS )
Copyright © 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright © 1998-2018 Zend Technologies
with Zend OPcache v7.1.33-14+ubuntu16.04.1+deb.sury.org+1, Copyright © 1999-2018, by Zend Technologies

All is functionnal on my webserver, i have an Diaspora* node running on it without any problem

I think my apache server does’nt interpret php code…

Apache needs libapache2-mod-php and possibly also libapache2-mod-php7-x to interpret php. Check that this package corresponds to you php-7.1 installation.
Note, that php has two differnt configs, one for cli (what you tested above) and one for apache2.
Check what you have in /etc/php/7.*

In my case I have 7.2 on ubuntu 18.04, and dpkg -L libapache2-mod-php7.2 shows me

/etc/apache2/mods-available/php7.2.conf
/etc/apache2/mods-available/php7.2.lo
/usr/lib/apache2/modules/libphp7.2.so

if all is there, check a2enmod php7.1 maybe that got disabled?

1 Like

Hi,

i have :

/etc/php/7.1 (and many other)

/etc/apache2/mods-available/php7.1.conf
/etc/apache2/mods-available/php7.1.load
/usr/lib/apache2/modules/libphp7.1.so

i had check also a2enmod php7.1 and they are on.

I decided to install another php version (7.2), because you have it and it was succesfull.

And, now, it run fine…

1 Like

all is ok,

TY :slight_smile:

1 Like