Manually Upgrading from Owncloud 10.0.13 to Nextcloud 12.x

That’s the best pos­si­ble upgrade, becau­se they are basi­cal­ly com­pa­ti­ble. From next­cloud 12.x you can upgrade your way towards the newest version.

First I uploa­ded next­cloud 12.x and pla­ced the con­fig file and the data fol­der from own­cloud in next­cloud as descri­bed elsewere.

First Problem: PHP 7.2

With the­se basic chan­ges finis­hed, trou­ble shoo­ting began: I got a mes­sa­ge that php 7.2 does not work with Next­cloud 12.x. To make this go away I had to uncom­ment (or dele­te) code in two files:

“index.php”

// Show warning if PHP 7.2 is used as Nextcloud is not compatible with PHP 7.2 for now
// @see https://github.com/nextcloud/server/pull/5791
if (version_compare(PHP_VERSION, '7.2.0') !== -1) {
	echo 'This version of Nextcloud is not compatible with PHP 7.2.<br/>';
	echo 'You are currently running ' . PHP_VERSION . '.';
	return;
}

and

“lib/versioncheck.php”

// Show warning if > PHP 7.1 is used as Nextcloud 12 is not compatible with > PHP 7.1
if (version_compare(PHP_VERSION, '7.2.0', '>=')) {
	http_response_code(500);
	echo 'This version of Nextcloud is not compatible with > PHP 7.2.<br/>';
	echo 'You are currently running ' . PHP_VERSION . '.';
	exit(-1);
}

This let me start the actu­al upgrade process.

2. Problem: Missing Apps

The upgrade stal­les due to miss­ing apps, e.g. “calen­der” and “cont­acts”. I copied them from the old own­cloud fol­der “apps” into the new next­cloud fol­der “apps” and the pro­cess continued. 

The last war­ning on “work­flowen­gi­ne” howe­ver is a red her­ring, as explai­ned here: https://​help​.next​cloud​.com/​t​/​u​p​g​r​a​d​e​-​f​r​o​m​-11 – 0‑3-to-12 – 0‑1-hangs-on-workflowengine/19167/27

“work­flowen­gi­ne” is just fine, the pro­blem is else­we­re. Have a look into your error.log and let’s move on to the next point:

3. Problem: Cannot use result of built-in function in write context in cloud/3rdparty/pear/archive_tar/Archive/Tar.php on line 639

So what’s going on in line 639? Goog­le spits out this solu­ti­on: https://www.dotkernel.com/php-troubleshooting/fix-installing-pear-packages-with-php‑7 – 2/

Okay, let’s replace in File “cloud/3rdparty/pear/archive_tar/Archive/Tar.php” on line 639

& func_get_args(); 

with

func_get_args();

That was easy, wasn’t it. Now the install rou­ti­ne proceeds.