Project

General

Profile

Bug #457

Error After Upgrading ownCloud to 7.0.2

Added by Daniel Curtis over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
09/18/2014
Due date:
% Done:

100%

Estimated time:
0.50 h
Spent time:

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
      

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();
              }
      }
      
  • I ran the manual upgrade again, and this fixed the problem:
    php -q console.php upgrade
    

Resources

#1

Updated by Daniel Curtis over 9 years ago

  • Project changed from 23 to Website Hosting
  • Status changed from New to Resolved
#2

Updated by Daniel Curtis over 9 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF