Very excited about the existance of this project, I'd love to support it where I can.
As a start, I've installed XAMPP on my local maschine and Oracle 10g Express Edition, Drupal 7.x-dev and the latest version of the Oracle project. I followed the instructions in INSTALL.oracle.txt and created a settings.php with the following settings:
$databases = array (
'default' =>
array (
'default' =>
array (
'driver' => 'oracle',
'database' => 'system',
'username' => 'drupal',
'password' => '',
'host' => 'localhost',
'port' => '',
),
),
);
$db_prefix = 'test1_';
When I go to http://www.example.com/install.php I can select the install profile, select the language and next I get the screen to input database parameters, hence the defined settings are invalid.
Now, there are several notices and warnings displayed on that screen:
* Notice: Use of undefined constant LOG_LOCAL0 - assumed 'LOG_LOCAL0' in include_once() (line 17 of C:\Develop\Drupal7\includes\database\oracle\database.inc).
* Warning: openlog() expects parameter 3 to be long, string given in include_once() (line 17 of C:\Develop\Drupal7\includes\database\oracle\database.inc).
* Notice: Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 191 of C:\Develop\Drupal7\includes\install.inc).
* Notice: Undefined index: use_cache in DatabaseConnection_oracle->__construct() (line 73 of C:\Develop\Drupal7\includes\database\oracle\database.inc).
Underneath the first field in the form is Database type and the only two options I get are "MySQL" and "SQLite", no PostgreSQL and no Oracle.
Any idea what may be causing this?
Comments
Comment #1
aaaristo commentedit looks like on windows you get some problem... i just committed some patches..
you should use LOG_USER instead of LOG_LOCAL0 in database.inc
and add 'use_cache' => false to your conf like this:
$databases = array (
'default' =>
array (
'default' =>
array (
'driver' => 'oracle',
'database' => 'system',
'username' => 'drupal',
'password' => '',
'host' => 'localhost',
'port' => '',
'use_cache' => false
),
),
);
$db_prefix = 'test1_';
i've actually fixed those things in the last commit.
Don't use the $db_prefix unless you really need it.. Because you will need a more powerful oracle user to do that.
DB prefixes are translated in schemas.
For the rest, you should see the Oracle option in your list, try to check if now you get it.
Which release of the 7.x Drupal are you using?
Andrea
Comment #2
aaaristo commentedIt would be great to have someone supporting the driver other than me so please feel free to submit patches when you find bugs, or ask for informations opening support requests / feature requests so that others can learn from your questions.
Andrea
Comment #3
jurgenhaasHi @andrea, thanks for your support. I've downloaded your latest oracle module and also the latest Drupal 7.x-dev as of yesterday (before I used the dev version from April 11).
First of all, changing LOG_LOCAL0 to LOG_USER had to be done manually, I guess this should be changed in your code, shouldn't it?
After that I ran install.php again and still don't get Oracle as an option for database types. Instead I receive the following error/warnings:
Comment #4
aaaristo commentedThe last is 30 Apr... May be you downloaded it before the packaging system repackage...
Which version of PHP are you using? The errors that you are receiving looks like php 5.3 that is not yet supported (http://drupal.org/requirements).
And probably you don't get the oracle option because you do not have the pdo_oci extension active and working.
Try creating a phpinfo(); page and search for "PDO drivers" you should have 'oci' listed.
Comment #5
jurgenhaasYou're right, the latest XAMPP came with PHP 5.3.1, I now changed back to XAMPP 1.7.1 which comes with PHP 5.2.9
Then I activated
extension=php_pdo_oci.dllin the php.ini but that produces an error message because oci.dll can not be found. This oci.dll is obviously required by php_pdo_oci.dll but I have no idea where to get that dll from and where to put it then. Any ideas? Ah, yes, I'm on Windows with my test maschine.Comment #6
aaaristo commentedYou should install an oracle instant client:
http://www.oracle.com/technology/software/tech/oci/instantclient/index.html
-basic
-sdk
Comment #7
aaaristo commentedchanging the type of the thread
Comment #8
jurgenhaasPerfect, I downloaded that and copied the "Instant Client Package - Basic Lite" and copied the DLL files into the apache/bin directory. Now I do have OCI up and running.
So back to the install.php in Drupal. Still getting lots of errors:
Also, as I'm not quite familiar with Oracle administration yet, I'm not quite sure what to use for databse name, username and password. I tried several variations with no luck, so I'm keen to get some hints.
EDIT: When Drupal tries to connect to the database (during installation) the following error is reported:
Comment #9
aaaristo commentedjurgenhaas, this is a support request there is actually no bug in what you are facing...
it look like you are still using php 5.3. You should not get those strict warnings in 5.2.
ORA-12514 means that drupal was able to connect to the port of your oracle listener, but you gave a wrong SID in the database name field... (you should use 'XE' for the Express Edition)
Or you instance is not registered with the listener...
try:
sqlplus drupal/drupal@host:port/xe
to see if you can connect with sqlplus.
Comment #10
jurgenhaasAppologize for setting tha category back to "bug report" in #8, that happened unintentionally because I had the form open in my browser while you correctly changed category to "support request" and then submitting the form used the previous value.
Back to the topic: the tip with "Datebase name" as XE did the trick, thanks a lot.
However, I'm now getting
Fatal error: Call to undefined function _db_check_install_needed() in C:\Develop\Drupal7\includes\database\oracle\database.inc on line 166but I got over that form, so connecting to the databse worked just fine.Comment #11
aaaristo commentedComment #12
aaaristo commentedfunction _db_check_install_needed() should be defined in includes/database/database.inc... but i removed the call because it is pretty useless.