Created attachment 746580 [details] HTTPD error log Description of problem: After updating to the latest version (4.5.10) the database upgrade (postgresql) fails leaving owncloud unusable state. Version-Release number of selected component (if applicable): owncloud-4.5.10-1.fc18.noarch owncloud-httpd-4.5.10-1.fc18.noarch owncloud-postgresql-4.5.10-1.fc18.noarch php-pear-MDB2-Driver-pgsql-1.5.0-0.7.b4.fc18.noarch How reproducible: Steps to Reproduce: 1.Install owncloud 4.5.9, use postgresql as the database backend. 2.Upgrade to 4.5.10 3.Go to the login page. Actual results: "Error while upgrading the database" page is displayed. Expected results: Database upgrade succeeds and owncloud loginpage is displayed. Additional info: First the was problem with pear's pgsql driver (see attachment), I made the compatible and now it doesn't output anything to HTTPD's error log. In the syslog ( /var/log/messages ): ownCloud[29092]: {core} Failed to update database structure (MDB2 Error: syntax error, _doQuery: [Error message: Could not execute statement]
Did you check upstream bug tracker for similar issues?
I tried checking, did not find exact match. Some reports about SQLite databases getting locked and then some similiar error about "Failed to update database structure". There was usually a SQL statement in log files, that would help getting to the root cause, which statement fails. My logfiles just have the: ownCloud[29092]: {core} Failed to update database structure (MDB2 Error: syntax error, _doQuery: [Error message: Could not execute statement] But no indication of what statement fails. As this quite small update (from 4.5.9 to 4.5.10) is there even modifications to the database structure?
I'm having this same problem upgrading from owncloud-4.5.11-2.fc19 to owncloud-4.5.13-1.fc19 under Fedora 19. Owncloud is working again after a yum downgrade to the previous version. The error message in the httpd error_log is PHP Strict standards: Declaration of MDB2_Driver_Manager_pgsql::listTables() should be compatible with MDB2_Driver_Manager_Common::listTables($database = NULL) in /usr/share/pear/MDB2/Driver/Manager/pgsql.php on line 57 It seems that this code path is only used after an upgrade of a postgresql-backed owncloud. The error message suggests that the actual bug might be in php-pear-MDB2-Driver-pgsql, but I don't know PHP well enough to confirm it or write a test case. My searching led straight to this bug report. I wasn't able to find anything upstream or on the broader internet.
This bug seems similar to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=717579 https://github.com/owncloud/core/issues/4158 and https://github.com/owncloud/core/issues/4305 These reports are for owncloud 5, but I think it also applies to owncloud 4.5. Owncloud bundles a patched version of MDB2-Driver-pgsql, which I've found in upstream's owncloud-4.5.13.tar.bz2 under owncloud/3rdparty/MDB2.
I just copied MBD2.php and the MDB2 tree from the owncloud tarfile to /usr/share/owncloud/3rdparty and successfully updated to owncloud-4.5.13-1.fc19.noarch. So yes, owncloud's patches to MDB2 are needed to work with PostgreSQL.
can you repeat your test case with this build? http://koji.fedoraproject.org/koji/taskinfo?taskID=5819897
Hi Gregor, would you mind to reschedule the scratch build? I encountered the problem, too, and I'm willing to test the fix. FWIW, I've updated from owncloud-4.5.12-1.fc19.noarch to owncloud-4.5.13-1.fc19.noarch.
I now noticed the owncloud-4.5.13-3.fc19.noarch in updates-testing (it didn't apparently make to the stable on ARM yet) and it indeed fixes the issue. Sorry for the noise in comment 7. The bug should be closed now IMO.