Hi, I'm trying to install Drupal 8 using Oracle 12.1c database that is sitting in a separate server. After installing the Drupal Oracle Driver using composer (following instruction on https://www.drupal.org/docs/8/modules/oracle-driver), I am able to see the "Oracle" option during installation. However, when I entered all the database details and tried to go to the next step, the installation crashed. I checked the apache server log and the following error was logged:
PHP Fatal error: Declaration of Drupal\\Driver\\Database\\oracle\\Statement::fetchObject($class_name = 'stdClass', array $ctor_args = Array) must be compatible with PDOStatement::fetchObject($class_name = NULL, $ctor_args = NULL) in /var/www/html/web/drivers/lib/Drupal/Driver/Database/oracle/Statement.php on line 10, referer: http://xxx.xxx.xxx.xxx/web/core/install.php?rewrite=ok&langcode=en&profi...
This looks like the Drupal Oracle Driver is incompatible with the PHP's PDO library. Can anyone point me to what may be the cause?
My system setup:
OS: RHEL 7.5 (Maipo)
PHP: 7.2.8, installed from remi-php72 repository (version 7.2.8-1.el7.remi)
PHP info:
PDO drivers oci, sqlite, sqlsrv
PDO Driver for OCI 8 and later enabled
OCI8 Support enabled
OCI8 DTrace Support enabled
OCI8 Version 2.1.8
Revision $Id: 4543974aab26d8a3d85257ab18d0dca4503ff9e7 $
Oracle Run-time Client Library Version 12.2.0.1.0
Oracle Compile-time Instant Client Version 12.2
Drupal is prepped using drupal-composer:
composer create-project drupal-composer/drupal-project:8.x-dev drupal_install --stability dev --no-interaction
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | fetch_not_compatible_fix-2988592-4.patch | 500 bytes | cameron prince |
Comments
Comment #2
tomogden commented@yktan , I found a similar-sounding issue at https://github.com/jimbojsb/pseudo/issues/4 . I wonder if the solution they found there will help you?
Comment #3
yktan commented@tomogden Thanks for much for sharing that information! I managed to solve the problem by following the tips given in the link that you provided. For future reference, the change that I made to fix the problem that I was facing was:
/drivers/lib/Drupal/Driver/Database/oracle/Statement.php:
to
Thanks so much for your help
Comment #4
cameron prince commentedI ran into this problem too... Thanks for the fix. Here's a patch.
Comment #5
cameron prince commentedComment #6
jaydee1818 commentedPatch works for me
Comment #7
jaydee1818 commentedComment #9
bohartCommitted to 8.x-1.x dev.
Thanks!