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.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 0001-All-changes-are-Oracle-11g-specific.patch | 5.42 KB | yesmathew |
Comments
Comment #1
aaaristo commentedcomment out line 131 in includes/update.inc (it is a core bug http://drupal.org/node/1029080)
Comment #2
siromega commentedI 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.
Comment #3
siromega commentedWhoops I didn't mean to change the status back there.
Comment #4
aaaristo commentedyes it is definitely the drupal core to be broken..
http://drupal.org/node/1029080
Comment #5
yesmathew commentedRefer my comments @ https://www.drupal.org/node/1804084#comment-11388827
Comment #6
yesmathew commentedComment #7
yesmathew commentedThis is a Drupal Core issue and not Oracle Driver issue. As files affected are includes/menu.inc and includes/update.inc
Comment #8
yesmathew commentedAs this error is specific to PDO_OCI (Oracle)
Comment #9
karolus commentedYour 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:
While this worked fine:
Since my specific requirements only needed PHP 5.3+ it was OK.