Odd Occurrance after upgrading to Ubuntu 16.04

php
9.1.x
webserver_issue

#1

Please help us by providing the following info. Before posting please also check the pinned "Known issues" threads and make sure that you're running the latest available version for your oC release: https://owncloud.org/changelog/

Steps to reproduce
1. Ubuntu do-release-upgrade from 14.04 LTS to 16.04 LTS
2.
3.

Expected behaviour
Tell us what should happen
It should just work!

Actual behaviour
Tell us what happens instead
When I go to my owncloud server page, I get a bunch of text instead of the frontpage.

Server configuration
Operating system: Ubuntu 16.04
Web server: Apache 2.4.18
Database: MySql
PHP version: 7.0.8
ownCloud version (see ownCloud admin page): 9.1.0
Updated from an older ownCloud or fresh install: 9.1.0 was working with Ubuntu 14.04
ownCloud log (data/owncloud.log, see https://central.owncloud.org/t/how-to-find-webserver-or-oc-logfile-enable-php-logfile/808):

Special configuration (external storage, external authentication, reverse proxy, server-side-encryption):

Integrity status for oC9+

This is what shows up on the web page. Or, you can see for yourself at https://cloud.phipac.com

* @author Lukas Reschke 
 * @author Morris Jobke 
 * @author Robin Appelman 
 * @author Thomas Müller 
 * @author Vincent Petry 
 *
 * @copyright Copyright (c) 2016, ownCloud, Inc.
 * @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 5.4.0 is used, this has to happen here
// because base.php will already use 5.4 syntax.
if (version_compare(PHP_VERSION, '5.4.0') === -1) {
	echo 'This version of ownCloud requires at least PHP 5.4.0
';
	echo 'You are currently running ' . PHP_VERSION . '. Please update your PHP version.';
	return;
}
try {
	require_once '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 (Exception $ex) {
	\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 (Error $ex) {
	\OC::$server->getLogger()->logException($ex, ['app' => 'index']);
	OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
	OC_Template::printExceptionErrorPage($ex);
}

#2

Ubuntu 16.04 switched to PHP 7.0. Try to install the packages manually:
sudo apt-get install php7.0
and make sure you have installed all required php-modules:
https://doc.owncloud.org/server/9.0/admin_manual/installation/source_installation.html#prerequisites

(often it is like php7.0-modulename), use apt-cache search modulename to find the corresponding package. If you installed owncloud from the repo, you might need owncloud-deps-php7.0 instead of owncloud-deps-php5.


#3

Thanks. PHP version was already 7.0.8 and no modules were missing. I removed owncloud-deps-php5, but owncloud-deps-php7.0 was already installed anyway. I still get the text page, which makes me wonder if something needs to be tweaked in the php.ini file or even the apache2.conf file.


#4

Perhaps you need to enable the module:
sudo a2enmod php7.0
and then restart apache


#5

Yes, thats very likely the issue here. The environment is not correctly configured to process php files.


#6

Seemed I had some lingering php5 stuff going on indeed. I purged all php5, fought with APCu for awhile, and finally got it all working again. Thanks!


#7

I did the upgrade a few days ago, I had a fresh OC 9.1 install running on Ubuntu 14.04 LTS and upgraded the server OS to 16.04 LTS without any relevant issue.
I just had to deal with some Redis problem because I had to use version 2.2.8 of its PHP / pecl module (that's the latest version working with PHP 5.5), so I had to reinstall the latest version to make it run under 16.04.


#8

I have the same issue, and installing php7.0 prompts an uninstall of owncloud. I'm hesitant about what to do just now.


#9

Please create a new thread for this issue giving more details what you did, which repos you're using and similar info.


#10