Upgrade to 9 Cannot redeclare class OC_L10N

Ask all your questions regarding OC 9.0 Please read the Support Forum Rules
Forum rules
The forums were migrated over to https://central.owncloud.org which is based on the forum software Discourse. The forums here is put into read-only mode starting from today.

More background information about this move and the reasoning behind it is available in this blogpost:

https://daniel.molkentin.net/2016/07/20 ... d-central/
TheBigWave
Newbie
Posts: 9
Joined: Tue Feb 19, 2013 12:05 pm
ownCloud version: 4.5.6

Upgrade to 9 Cannot redeclare class OC_L10N

Postby TheBigWave » Wed Mar 09, 2016 1:30 am

Environment: Nginx
Database: MySQL
OC-Version:9
PHP-Version:5.5.9

Hello everyone,
First of all Sorry for my Writing i'm not a native Speaker.
Today im try to upgrade from 8.2 to 9.
I extract the Files to my Documentroot folder, run occ upgrade as www-root, and normaly everything works like charm.
Today the upgrader produced the Following error.

Code: Select all

PHP Fatal error:  Cannot redeclare class OC_L10N in /var/www/owncloud/lib/private/l10n.php on line 42


ideas?
Thanks
TBW

NGINX LOG

Code: Select all

2016/03/09 00:16:51 [error] 3133#0: *49 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Cannot redeclare clas
s OC_L10N in /var/www/owncloud_ram/lib/private/l10n.php on line 42" while reading response header from upstream, clie
nt: 192.168.1.127, server: thebigwave.de, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "the
bigwave.de"

RealRancor
ownCloud master
Posts: 17381
Joined: Sat May 26, 2012 3:00 pm
ownCloud version: 9.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 7.0.x

Re: Upgrade to 9 Cannot redeclare class OC_L10N

Postby RealRancor » Wed Mar 09, 2016 8:47 am

Hi,

how did you do the upgrade? Deleting all files and folders except /data/ and /config/ before copying over the new files?
*gone*

cbrace
Beginner
Posts: 17
Joined: Tue Apr 16, 2013 5:10 am
Webserver: Apache
Database: MySQL
OS: Unknown
Location: Amsterdam

Re: Upgrade to 9 Cannot redeclare class OC_L10N

Postby cbrace » Wed Mar 09, 2016 10:53 am

I'm seeing the same fatal error this morning. OC9 updated via the FreeBSD ports system.

FreeBSD 10.2
Apache 2.4.18
MySQL 5.5.46
PHP 5.6.19

RealRancor
ownCloud master
Posts: 17381
Joined: Sat May 26, 2012 3:00 pm
ownCloud version: 9.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 7.0.x

Re: Upgrade to 9 Cannot redeclare class OC_L10N

Postby RealRancor » Wed Mar 09, 2016 10:56 am

Hi,

delete all files and folders within your oC install dir except /data/ and /config/ and then extract a fresh archive of oC9 into your install dir. If that still happens after that create a new bugreport to the developers:

viewtopic.php?f=32&t=23696
viewtopic.php?f=17&t=20688
*gone*

cbrace
Beginner
Posts: 17
Joined: Tue Apr 16, 2013 5:10 am
Webserver: Apache
Database: MySQL
OS: Unknown
Location: Amsterdam

Re: Upgrade to 9 Cannot redeclare class OC_L10N

Postby cbrace » Wed Mar 09, 2016 11:32 am

That fixed it, many thanks!

RealRancor
ownCloud master
Posts: 17381
Joined: Sat May 26, 2012 3:00 pm
ownCloud version: 9.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 7.0.x

Re: Upgrade to 9 Cannot redeclare class OC_L10N

Postby RealRancor » Wed Mar 09, 2016 11:43 am

Hi,

normally packages should do that for you. Maybe contact the packager of that FreeBSD ports about that issue.
*gone*

TheBigWave
Newbie
Posts: 9
Joined: Tue Feb 19, 2013 12:05 pm
ownCloud version: 4.5.6

Re: Upgrade to 9 Cannot redeclare class OC_L10N

Postby TheBigWave » Wed Mar 09, 2016 5:28 pm

Hi all,
nope i've got still Problems. I delete everything and restore a clean Backup.
After that i retry the Upgrade with the OC Manual
https://doc.owncloud.org/server/9.0/adm ... grade.html

Code: Select all

Doctrine\DBAL\Exception\TableExistsException: An exception occurred while executing 'CREATE TABLE `oc_addressbooks` (`id` BIGINT UNSIGNED AUTO_INCREMENT NOT NULL, `principaluri` VARCHAR(255) DEFAULT NULL, `displayname` VARCHAR(255) DEFAULT NULL, `uri` VARCHAR(255) DEFAULT NULL, `description` VARCHAR(255) DEFAULT NULL, `synctoken` INT UNSIGNED DEFAULT 1 NOT NULL, UNIQUE INDEX addressbook_index (`principaluri`, `uri`), PRIMARY KEY(`id`)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ENGINE = InnoDB':

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'oc_addressbooks' already exists
Update failed


Code: Select all

Set log level to debug
Updating database schema
Updated database
Disabled 3rd-party app: calendar
Disabled 3rd-party app: contacts
Disabled 3rd-party app: ownbackup
Disabled 3rd-party app: tasks
Disabled 3rd-party app: updater
Updating <files_pdfviewer> ...
Updated <files_pdfviewer> to 0.8
Updating <files_texteditor> ...
Updated <files_texteditor> to 2.1
Updating <gallery> ...
Updated <gallery> to 14.5.0
Updating <files> ...
Updated <files> to 1.4.4
Updating <files_external> ...
Updated <files_external> to 0.5.2
Updating <files_sharing> ...
Updated <files_sharing> to 0.9.1
Updating <files_trashbin> ...
Updated <files_trashbin> to 0.8.0
Updating <files_versions> ...
Updated <files_versions> to 1.2.0
Doctrine\DBAL\Exception\TableExistsException: An exception occurred while executing 'CREATE TABLE `oc_addressbooks` (`id` BIGINT UNSIGNED AUTO_INCREMENT NOT NULL, `principaluri` VARCHAR(255) DEFAULT NULL, `displayname` VARCHAR(255) DEFAULT NULL, `uri` VARCHAR(255) DEFAULT NULL, `description` VARCHAR(255) DEFAULT NULL, `synctoken` INT UNSIGNED DEFAULT 1 NOT NULL, UNIQUE INDEX addressbook_index (`principaluri`, `uri`), PRIMARY KEY(`id`)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ENGINE = InnoDB':

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'oc_addressbooks' already exists
Update failed
Maintenance mode is kept active
Reset log level

RealRancor
ownCloud master
Posts: 17381
Joined: Sat May 26, 2012 3:00 pm
ownCloud version: 9.0.2
Webserver: nginx
Database: MySQL
OS: Linux
PHP version: 7.0.x

Re: Upgrade to 9 Cannot redeclare class OC_L10N

Postby RealRancor » Wed Mar 09, 2016 5:31 pm

Hi,

you also need to restore the database. Then you shouldn't get this "Table 'oc_addressbooks' already exists" message
*gone*

TheBigWave
Newbie
Posts: 9
Joined: Tue Feb 19, 2013 12:05 pm
ownCloud version: 4.5.6

Re: Upgrade to 9 Cannot redeclare class OC_L10N

Postby TheBigWave » Thu Mar 10, 2016 12:15 am

make long story short, Now it Works
My Backup Daemon backuped a Corrupt DB and with the right Restore everyything works Perfect
Thanks:D

Zalem
Newbie
Posts: 7
Joined: Sat Oct 17, 2015 4:42 pm
ownCloud version: 7.0.5
Webserver: Apache
Database: SQLite
OS: Linux
PHP version: 5.6

Re: Upgrade to 9 Cannot redeclare class OC_L10N

Postby Zalem » Mon Apr 18, 2016 3:32 pm

Hi,
I'd like to reuse your thread: I get the same error, after I tried to update to OC 9.

Server: CentOS 6 on Uberspace (without root)
Database: SQLite3
OC-Version:8.2.1.4 (from config)
PHP-Version:5.6.20

After the manual update to OC9 failed, I restored the complete backup with the same error: I cannot even reach the OC login page (500, internal server error)
At least the log file shows alot of that errors:

Code: Select all

{"reqId":"0za+LQaGnbZqVsBcybM0","remoteAddr":"95.90.251.87","app":"PHP","message":"Cannot redeclare class OC_L10N at \/var\/www\/virtual\/zalem\/html\/owncloud\/lib\/private\/l10n.php#42","level":3,"time":"2016-04-17T21:45:16+00:00","method":"GET","url":"\/owncloud\/status.php"}


Code: Select all

{"reqId":"RZIZk3t7X8TCr+eelYNA","remoteAddr":"193.175.177.39","app":"PHP","message":"Cannot redeclare class OC_L10N at \/var\/www\/virtual\/zalem\/html\/owncloud\/lib\/private\/l10n.php#42","level":3,"time":"2016-04-18T12:33:56+00:00","method":"GET","url":"\/owncloud\/"}


My OC Desktop Clients are also not working anymore.
Maybe the main problem was not to deactivate the "new" 3rn party apps calendar and contacs (im used them to be 1st party)
So I deactivated all 3rd apps in owncloud.db and tried updating again, but the problem remained.

Maybe someone has an Idea how I could locate the problem?
Thanks in advance.


  • Similar Topics
    Replies
    Views
    Last post

Return to “ownCloud Server 9.0”

Who is online

Users browsing this forum: No registered users and 1 guest