1

Whenever I try to run the database update script update.php after upgrading modules a WSOD appears and the php error log shows this message:

PHP Fatal error: Class 'DatabaseTasks_postgresql' not found in <site root>/includes/install.inc on line 1338.

The only reason I can think of is that sometime ago I setup a Feed to import some records from a Postgres database into Drupal and it probably configured Drupal to check for Postgres. I am not sure if that is the real reason as it could be a different thing.

Is there some module I need to reinstall for the failure to go away?

These are the offending lines in install.inc.

**
 * Ensures the environment for a Drupal database on a predefined connection.
 *
 * This will run tasks that check that Drupal can perform all of the functions
 * on a database, that Drupal needs. Tasks include simple checks like CREATE
 * TABLE to database specific functions like stored procedures and client
 * encoding.
 */
function db_run_tasks($driver) {
  db_installer_object($driver)->runTasks();
  return TRUE;
}

/**
 * Returns a database installer object.
 *
 * @param $driver
 *   The name of the driver.
 */
function db_installer_object($driver) {
  Database::loadDriverFile($driver, array('install.inc'));
  $task_class = 'DatabaseTasks_' . $driver;
  return new $task_class();
}

update.php triggers a call to this piece of code and causes the error. Any ideas of the code may be bypassed or Drupal reconfigured to fix it?

1

1 Answer 1

1

It turns out there were two Postgres directories in includes/database.

includes/database/pgsql/install.inc and includes/database/postgresql/install.inc. The latter was out of date and redundant and may have been installed as part of the requirements for some Feeds SQL Importer. After deleting it the installation now works fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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