By mcolebank on
We are building a Drupal 8 site for a government agency and use Oracle. Is anyone using Oracle as the database for Drupal 8? I would like to know if the Drupal 8 Oracle Driver is stable or if we should avoid this configuration.
I saw that this project was a development version which makes me concerned that there will be a lot of issues.
Comments
=-=
It's in RC (Release Candidate) Status which indicates that its ready for the public to test. The only way you're going to know if there are issues with it related to your use case is to install it and test it.
Just tried it. It's now
Just tried it. It is NOT working on 8.6. Contacted the maintainer and he says it worked last on Drupal 8.3. Pls let me know if you get it working somehow on the latest version.
The maintainer has a firm that would be willing to do the work for a fee, PM me if you're considering that option, maybe we can both sponsor it.
That RC1 was released more than a year ago.
In the mean time 2 bug reports were filed for D8.
- Issue with creating database. Obviously, you can make sure the database exists up front.
- Issue with language translation in Drupal. Providing a path, but don't consider that a solution, more a workaround.
Not sure what you mean by not working. With specific details it might be resolved. Suggest to file a proper bug report.
The link to the drive has some garbage at the end, causing 404. Removing the garbage at the end gets you to the driver.
Proper link: https://www.drupal.org/project/oracle
Hi
I will try to file a bug report. The issue is that when out install the driver Drupal 8.6 (and 8.5) do not recognize the driver as valid so you never get the option to choose Oracle while using the web installer.
No errors or any indication of why its not working.
Checked the driver
- Doesn't even support creating the database, although you probably could copy the code from mysql/install/Tasks.php function about connecting and createDatabase().
Recall that being reported for other drivers as well, have no answer, yet.. Maybe check the queue, including queue of driver for MongoDB.
Broken
Thats a bit comforting to know other drivers are seeing this problem. points to a change that may have happened after 8.3 that broke the way drupal loads custom drivers. Will monitor/check the other ones.
I already have my database existing, generally creating an oracle db directly from sql, while doable is not an easy feat since there are lots of settings/options etc. Was hoping to just point to my existing oracle db with a user i had previously created.
Below the code from core/includes/install.inc
Looks like it should detect the driver automatically, provided it is placed correctly. Don't think the location mentioned with oracle driver is correct. See the 2 folders scanned for drivers. The mask is just filtering proper names (defined in bootstrap.inc). It does need an Install/Tasks.php to be recognized.
CORRECTION: The oracle driver mentions the second path in the script. Looks like that is the path for non-core drivers.
Note that the Database server must be up and running. The creation of the database obviously needs the proper permissions and should use the options desired for Drupal or look at settings to allow custom ones. There is something like init_commands on the $database that could be used.
I did see that snippet of
I did see that snippet of code from this issue https://www.drupal.org/project/drupal/issues/783812
Based on that issue log i did try using composer plus installer path and changing it so the files installed to the following;
1. <drupalroot>/web/core/lib/Drupal/Core/Database/Driver (default where mysql, sqlite drivers are stored) installer then threw HTTP 500 about namespace already in use.
2. <drupalroot>/drivers/lib/Drupal/Driver/Database In this case driver is unrecognized, but no error.
Definitely this is the correct place where the available drivers are discovered and made available to drupal, its not clear to me though why placing the file here does not work. And i did double check the path in INSTALL.txt and it is the same like you confirmed yourself.
Any thoughts?
The folder drivers should be in web !
Not sure which one is incorrect, drivers should be in drupalroot which should be web.
Must be either in the wrong folder or pdo missing. Maybe add a watchdog to see which is the problem.
Note that /web/core/lib/Drupal/Core/Database ... should not be altered. When not existing as core driver it is assumed custom.
There is a Tasks.php in the
There is a Tasks.php in the Oracle driver, not sure what you mean.
The tasks.php refers to OCI driver but i've tried both enabling and disabling the driver (/etc/php.d/php_oci.ini) to enable the pdo_oci.so library but neither seems to work.
How would i using init_commands on the $database.. not sure what you mean by that last line.
Thanks!
init_commands
See https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Database%...
You should be able to have it in settings.php as well:
$databases['default']['default']['init_commands'] = 'set sql_mode=ansi';
Need support for above issue
Anyone tried in drupal 8 latest version. Need to use drupal with Oracle database instead of mysql.
BUMP
Has anyone gotten the Oracle integration to work properly with D8? Please share your experience
I am trying to get it to work
I am trying to get it to work as a secondary DB that I can use to perform queries. Every time I try to establish a connection I get a class Drupal\\Driver\\Database\\oracle not found error.
Is anyone else running into this issue?
New driver requirements
Looks like there are new driver requirements for modules using a custom db driver:
https://www.drupal.org/node/3123251