Owncloud/Bugs
Cannot redeclare class
Upgrading from owncloud 8.0.2-4 to owncloud 8.0.2-5[1] made OC fail to execute with:
[Thu Mar 19 21:16:03 2015] [error] [client 2601:9:8500:6db:2c2:c6ff:fe3a:c302] FastCGI: server "/var/www/fastcgi/php5.fastcgi" stderr: PHP message: PHP Fatal error: require_once(): Cannot redeclare class oca\\files\\share\\proxy in /var/www/owncloud/lib/private/app.php on line 117
Which basically says that the class has been declared already[2] somewhere else.
In /var/www/owncloud/apps/files_sharing/appinfo/app.php I commented out the following line:
OC_FileProxy::register(new OCA\Files\Share\Proxy());
And then OC would work just fine again. However, I was then able to revert this change and OC would still work! o_O
3rd party apps disabled
ownCloud will be updated to version 8.0.3.
Please make sure that the database, the config folder and the data folder have been backed up before proceeding.
To avoid timeouts with larger installations, you can instead run the following command from your installation directory:
./occ upgrade
Updating ownCloud to version 8.0.3, this may take a while.
Turned on maintenance mode
Checked database schema update
Checked database schema update for apps
Updated database
Turned off maintenance mode
Following 3rd party apps have been disabled: bookmarks, calendar, contacts
The update was successful. Redirecting you to ownCloud now.
Upgrading from 8.1.1 to 8.1.3 on Debian Jessie
This is explained on the mailinglist[3]:
> Yes, with 8.1.3 the owncloud-app-* packagages are now consolidated into > the owncloud-server package. > We always had issues with postinstall scripts being in the wrong order, > and we no longer have a real reason to keep the apps separate.
So, in should be possible to use apt-get dist-upgrade to upgrade from v8.1.1 to v8.1.3.
Upgrading from 8.2.2 to 9.0.0 on Debian Jessie
These are fixed by applying: Add base rewrite rule only when RewriteBase is defined or by fixing /var/www/owncloud/.htaccess
< RewriteRule .* index.php [PT,E=PATH_INFO:$1] > RewriteRule . index.php [PT,E=PATH_INFO:$1]
- General error: 1 table "oc_addressbooks" already exists
- Old contacts are not showing up after upgrading to ownCloud 9.0.1 and Contacts 1.2.0.0
This can be fixed by dropping the affected tables (they should be empty anyway) and run occ upgrade again:
SQLSTATE[HY000]: General error: 1 table "oc_addressbooks" already exists SQLSTATE[HY000]: General error: 1 table "oc_cards" already exists SQLSTATE[HY000]: General error: 1 table "oc_addressbookchanges" already exists SQLSTATE[HY000]: General error: 1 table "oc_calendarobjects" already exists SQLSTATE[HY000]: General error: 1 table "oc_calendars" already exists SQLSTATE[HY000]: General error: 1 table "oc_calendarchanges" already exists SQLSTATE[HY000]: General error: 1 table "oc_calendarsubscriptions" already exists SQLSTATE[HY000]: General error: 1 table "oc_schedulingobjects" already exists SQLSTATE[HY000]: General error: 1 table "oc_cards_properties" already exists SQLSTATE[HY000]: General error: 1 table "oc_dav_shares" already exists
Uprade to OC 10
ownCloud 9.2 or lower is required
$ sudo -u www-data /bin/bash $ cd /var/www/owncloud $ php ./occ upgrade ownCloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Set log level to debug Repair warning: You have incompatible or missing apps enabled. Repair warning: please install app manually with tarball or disable them occ app:disable bookmarks occ app:disable calendar occ app:disable contacts OC\RepairException: Upgrade is not possible Update failed Maintenance mode is kept active Reset log level ownCloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade ownCloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Maintenance mode disabled ownCloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade [Exception] App "Bookmarks" cannot be installed because the following dependencies are not fulfilled: ownCloud 9.2 or lower is required. App "Calendar" cannot be installed because the following dependencies are not fulfilled: ownCloud 9.2 or lower is required. App "Contacts" cannot be installed because the following dependencies are not fulfilled: ownCloud 9.2 or lower is required.
This was solved by 1) disabling the applications and then 2) upgrading:
php ./occ app:disable bookmarks php ./occ app:disable calendar php ./occ app:disable contacts php ./occ upgrade
Now we can list and update the applications:
$ php ./occ market:list contacts twofactor_totp customgroups guests twofactor_privacyidea files_external_ftp calendar richdocuments $ php ./occ -vvv market:install contacts contacts App updated. $ php ./occ -vvv market:install calendar calendar: Installing new version 1.4.2 ... calendar: App updated.
The bookmark app is no more:
$ php ./occ -vvv market:install bookmarks bookmarks: App (bookmarks) is not known at the marketplace.
Invalid command 'php_value'
The web server's error.log prints:
[core:alert] /var/www/owncloud/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a \ module not included in the server configuration
And indeed:
$ cat /var/www/owncloud/.htaccess [...] <IfModule mod_php5.c> php_value always_populate_raw_post_data -1 </IfModule> php_value upload_max_filesize 513M php_value post_max_size 513M php_value memory_limit 512M php_value mbstring.func_overload 0 php_value default_charset 'UTF-8' php_value output_buffering 0
While the first is enclosed in an IfModule stanza, the others are not an Apache is trying to interpret those. Commenting out these helps. We may want to define these via php.ini later on.
Access to /dev/urandom
OC complains not having access to /dev/urandom[4]. We should allow access to that device in our open_basedir configuration:
$ grep ^open_basedir /etc/php/7.0/fpm/conf.d/90-local.ini open_basedir = [...]:/dev/urandom
Misc
Allow "show password" to be disabled & patch- they finally fixed it in #4577 and #4580 :-)