Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
First contribution towards supporting Firebird database on Drupal 8. Code needs work, specially function query in file database.inc. Sponsor: TriSolutions
Comment | File | Size | Author |
---|---|---|---|
#3 | firebird.tar_.gz | 5.37 KB | nickvidal |
firebird.tar_.gz | 5.39 KB | nickvidal |
Comments
Comment #1
Damien Tournoud CreditAttribution: Damien Tournoud commentedLooks promising.
Could you write down a tutorial on how to install firebird + pdo_firebird on any decent modern distribution (especially Debian/Ubuntu)?
Comment #2
nickvidal CreditAttribution: nickvidal commentedThanks DamZ,
For now I'll write a short tutorial here. Later I'll publish a more complete tutorial and add it to the documentation.
Install Firebird on Linux:
sudo apt-get install firebird2-super-server firebird2-utils-super firebird2-dev
Install Firebird on Windows:
Download from firebirdsql.org.
Create Drupal's database on Firebird:
Run /usr/lib/firebird2/bin/isql on Linux.
Or C:\Program Files\Firebird\bin\isql on Windows.
Enter CREATE DATABASE '[some_path]/drupal.fdb' user 'SYSDBA' password 'masterkey';.
Configure PHP:
Edit your php.ini file and search/uncomment/add the following lines:
extension=php_pdo.dll
extension=php_pdo_firebird.dll
Restart Web Server on Linux:
sudo /etc/init.d/apache2 restart
Restart Web Server on Windows:
runas /user:administrator iisreset
Download Drupal:
Download Drupal from drupal.org.
Install Drupal on Linux:
Untar Drupal in /var/www/.
Install Drupal on Windows:
Unzip Drupal in C:\Inetpub\wwwroot.
Add Firebird support to Drupal:
Unzip files attached in drupal\includes\database\firebird.
Access Drupal on Browser:
Type this address: http://localhost/drupal
Fill in the required data:
Select Firebird. Enter the path and name of the database created. Firebird's default username and password are SYSDBA and masterkey.
Comment #3
nickvidal CreditAttribution: nickvidal commentedNew files attached.
Comment #4
mariuz CreditAttribution: mariuz commentedI have some issues with the install script
here is how i try to solve them
http://lsces.co.uk/wiki/index.php?page=Drupal+7+on+Ubuntu+Jaunty+
Comment #4.0
mariuz CreditAttribution: mariuz commentedwill be tested in drupal 8 only
Comment #5
amc CreditAttribution: amc commentedComment #6
ematrix CreditAttribution: ematrix commentedI can help as you install drupal on my slack 12.2 and I want to work in firebird if I may say that this error
PHP Fatal error: Class 'DatabaseInstaller' not found in /webserver/drupal/includes/database/firebird/install.inc on line 6
<?php
// $Id$
// Firebird/Interbase specific install functions
class DatabaseInstaller_firebird extends DatabaseInstaller {
protected $pdoDriver = 'firebird';
public function name() {
return 'Firebird';
}
}
I see that the mysql driver is
DatabaseTasks
and firebird is DatabaseInstaller
Thank
Comment #7
catchCore support will have to go into Drupal 8, but database drivers can be implemented as contrib modules now in D7.
Comment #8
mariuz CreditAttribution: mariuz commentedyou can change it , i will create a bzr repository in launchpad and send you the changes
Comment #9
mariuz CreditAttribution: mariuz commentedI have created the git repository and i fixed the above error and others
http://gitorious.org/firebird-drupal/firebird-drupal
but now i'm stuck on another errro , i hope to fix it today
Failed to CREATE a test table on your Firebird database server with the command CREATE TABLE drupal_install_test (id int NULL). Firebird reports the following message: CREATE TABLE drupal_install_test (id int) - Array ( ) SQLSTATE[HY000]: General error: -607 unsuccessful metadata update Table DRUPAL_INSTALL_TEST already exists
Also i have updated the guide in the wiki
http://lsces.co.uk/wiki/index.php?page=Drupal+7+on+Ubuntu+Jaunty+
Comment #10
mariuz CreditAttribution: mariuz commentedIt might be solved easily by using something like is described here
http://drupal.org/node/1081460
I will check in weekend
Comment #11
FranciscoLuz CreditAttribution: FranciscoLuz commentedHi Guys,
I forked the code from #9 http://gitorious.org/firebird-drupal/firebird-drupal to https://github.com/drupalista-br/Firebird-Drupal7-Layer and did these slight changes here https://github.com/drupalista-br/Firebird-Drupal7-Layer/commits/master
I added the database files to /includes/databases/firebird in a Drupal 7 installation.
My firebird version is 1.5 in case that matters.
I am getting this error here at installation:
If you know how to fix this, please help me out because I have absolutely no idea on how to tackle it.
Any shed of light will be very much appreciated.
Cheers,
Comment #12
mariuz CreditAttribution: mariuz commentedyou need to remove NULL from column definition
by default column is nullable
If you add a column to a table that already has records, the fields added to the existing records will be NULL, except if you declare the column as NOT NULL and specify a default value for it. Note that both conditions must be satisfied for the fields to become anything other than NULL.
http://www.firebirdsql.org/manual/nullguide.html#nullguide-null-as-default
Comment #13
josefg CreditAttribution: josefg commentedI'm trying to follow the tutorial on this page, but get stuck on the same point as #6. Using D7.
Any hints on how to get this working? I don't actually need it for my default database, but for an auxiliary db from which I intend to draw some useful data to a custom-made module.
Comment #14
mariuz CreditAttribution: mariuz commentedI have updated the code , it still needs some tweaks
https://gitorious.org/firebird-drupal/firebird-drupal/
There are no visible errors but the install doesn't continue (i double checked the permissions with pdo connection)
Failed to CREATE a test table on your database server with the command CREATE TABLE {drupal_install_test} (id int NULL). The server reports the following message: .
Are you sure the configured username has the necessary permissions to create tables in the database?
Comment #16
mariuz CreditAttribution: mariuz commentedDrupal 7 progress
I have moved the git repository to github
also i have cleaned up the code base a little bit
https://github.com/mariuz/firebird-drupal
The installation reaches this step
CREATE TABLE drupal_install_test (id int)
INSERT INTO drupal_install_test (id) VALUES (1)
UPDATE drupal_install_test SET id = 2
DELETE FROM drupal_install_test
DROP TABLE drupal_install_test
SELECT "VALUE" FROM "VARIABLE" WHERE name = :name
name => install_task
seems to be an issue with a select from a non existent table
Comment #17
mariuz CreditAttribution: mariuz commentedHere is the related issue from pgsql install on drupal 8
https://www.drupal.org/node/2001350#comment-7723229
Comment #18
apadernoComment #19
mgiffordUnassigning stale issue. Hopefully someone else will pursue this.
Comment #21
daffie CreditAttribution: daffie commentedI think this would be best done in a contrib module.
Comment #22
NWOM CreditAttribution: NWOM commentedThis looks like an interesting way to get interfaces working with external Firebird DBs. Will have a look next week if it can be somehow incorporated for D9 or if better suited as a contrib module.
Comment #23
apadernoThere isn't any patch, so the status cannot be Needs work.
Comment #24
apadernoComment #25
NWOM CreditAttribution: NWOM commented#3 and #16 include files that can be made into a patch.
Comment #26
apaderno@NWOM One of those comments has an archive attached, while the other one contains a link to an external repository. They aren't patches.
We review patches, not something that can be made into a patch.
Comment #27
longwaveSince https://www.drupal.org/node/3123251 it is possible for a contrib module to provide a database driver without any special installation steps.
Also, as SQL Server is only supported in contrib and not core I suspect that any other new drivers should be developed in contrib first and only considered for core once they are both stable and widely used.