I'm receiving a "A PDO database driver is required!" message whenever I try to run update.php on my Drupal 7 installation.

I'm able to view the site, add content, and everything, but can't utilize the update.php page due to this error coming up.

Any assistance is greatly appreciated. Thanks!

Below is the full error:

A PDO database driver is required!

You need to enable the PDO_ORACLE database driver for PHP 5.2.4 or higher so that Drupal 7 can access the database.

See the system requirements page for more information.

Comments

aaaristo’s picture

Status: Active » Closed (duplicate)

comment out line 131 in includes/update.inc (it is a core bug http://drupal.org/node/1029080)

siromega’s picture

Status: Closed (duplicate) » Active

I had this problem. Drupal's upgrade script wants the Oracle PDO driver name ("oci") appended to the "DatabaseConnection" class. Instead of "DatabaseConnection_Oracle" as defined in /includes/database/oracle/database.inc, its looking for "DatabaseConnection_oci" in the includes/database/oci directory. Unfortunately I've been buried under projects at my real job and haven't been able to get back around to fixing this (I've had other non-related errors after you rename the class in oci/database.inc, so I can't say this is a for sure fix).

Though I wonder, if its only happening in Drupal's upgrade script, maybe upgrade.php is whats broken.

siromega’s picture

Status: Active » Closed (duplicate)

Whoops I didn't mean to change the status back there.

aaaristo’s picture

yes it is definitely the drupal core to be broken..
http://drupal.org/node/1029080

yesmathew’s picture

yesmathew’s picture

Project: Oracle Driver »
Version: 7.x-1.3 »

This is a Drupal Core issue and not Oracle Driver issue. As files affected are includes/menu.inc and includes/update.inc

yesmathew’s picture

Status: Closed (duplicate) » Needs review

As this error is specific to PDO_OCI (Oracle)

karolus’s picture

Your mileage may vary, but I have a feeling it depends on the server (and configuration) at your web host.

For me, I had to do some trial and error checking which PHP version would work, and which would throw the error. This is all added to the .htaccess file:

For instance, this would throw the PDO error:

# Use PHP5.6 as default
        AddHandler application/x-httpd-phpbeta .php

While this worked fine:

# Use PHP5.4 as default
        AddHandler application/x-httpd-php54 .php

Since my specific requirements only needed PHP 5.3+ it was OK.

Project: » Lost & found issues

This issue’s project has disappeared. Most likely, it was a sandbox project, which can be deleted by its maintainer. See the Lost & found issues project page for more details. (The missing project ID was 1833354)