2

I have upgraded my local site to Drupal 7.7 from Drupal 7.4, following the instructions in How to upgrade Drupal 7 to Drupal 7.2.

Before I could use update.php, visiting my site got me this message on every page of the site:

Fatal error: Class 'DatabaseConnection' not found in C:\Users\Developer\Documents\Sites\accountablog\includes\database\database.inc on line 17

Doing a database restore did nothing to alleviate the problem.
What can I do to fix the problem?

3

The database.inc file does contain the definition of the class DatabaseConnection.

/**
 * Base Database API class.
 *
 * This class provides a Drupal-specific extension of the PDO database
 * abstraction class in PHP. Every database driver implementation must provide a
 * concrete implementation of it to support special handling required by that
 * database.
 *
 * @see http://php.net/manual/en/book.pdo.php
 */
abstract class DatabaseConnection extends PDO {
  // …
}

It is probable the file was not correctly copied, or has been corrupted during the copy; that would explain why the class has not been found, but the class is effectively present in the file that comes with Drupal 7.

  • Recopied, and worked! I was freaking out. Thank you. – Matt Aug 2 '11 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.