Bug #457
Error After Upgrading ownCloud to 7.0.2
Description
I encountered a problem after upgrading my ownCloud instance, the symptom was that browsing to the URL where the ownCloud is hosted would only display the maintenance landing page. I decided to log into the web server hosting the ownCloud instance via SSH and manually upgrade.
- Manually upgrade ownCloud:
cd /usr/local/www/owncloud php -q console.php upgrade
- This resulted in the following error:
PHP Fatal error: Call to a member function disableQueryStatementCaching() on a non-object in /usr/local/www/owncloud/lib/private/db.php on line 423
- This resulted in the following error:
After looking around, I found a workaround on the ownCloud forum. The solution is to edit db.php and add self::connect();
- Edit db.php
vi /usr/local/www/owncloud/lib/private/db.php
- And then look for the following piece of code:
/** * @param bool $enabled */ static public function enableCaching($enabled) { self::connect(); if ($enabled) { self::$connection->enableQueryStatementCaching(); } else { self::$connection->disableQueryStatementCaching(); } }
- And then add self::connect(); to look like the following:
/** * @param bool $enabled */ static public function enableCaching($enabled) { self::connect(); if ($enabled) { self::$connection->enableQueryStatementCaching(); } else { self::$connection->disableQueryStatementCaching(); } }
- And then look for the following piece of code:
- I ran the manual upgrade again, and this fixed the problem:
php -q console.php upgrade
Resources¶
Updated by Daniel Curtis over 10 years ago
- Project changed from 23 to Website Hosting
- Status changed from New to Resolved