First contribution towards supporting Firebird database on Drupal 8. Code needs work, specially function query in file database.inc. Sponsor: TriSolutions

CommentFileSizeAuthor
#3 firebird.tar_.gz5.37 KBnickvidal
firebird.tar_.gz5.39 KBnickvidal
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Damien Tournoud’s picture

Looks promising.

Could you write down a tutorial on how to install firebird + pdo_firebird on any decent modern distribution (especially Debian/Ubuntu)?

nickvidal’s picture

Thanks 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.

nickvidal’s picture

FileSize
5.37 KB

New files attached.

mariuz’s picture

Version: 8.x-dev » 7.x-dev
Status: Needs work » Active

I 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+

mariuz’s picture

Issue summary: View changes

will be tested in drupal 8 only

amc’s picture

Status: Active » Needs work
ematrix’s picture

I 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

catch’s picture

Version: 7.x-dev » 8.x-dev

Core support will have to go into Drupal 8, but database drivers can be implemented as contrib modules now in D7.

mariuz’s picture

you can change it , i will create a bzr repository in launchpad and send you the changes

mariuz’s picture

I 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+

mariuz’s picture

It might be solved easily by using something like is described here

http://drupal.org/node/1081460

I will check in weekend

FranciscoLuz’s picture

Hi 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:

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: SQLSTATE[HY000]: General error: -104 Dynamic SQL Error SQL error code = -104 Token unknown - line 1, char 42 NULL

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,

mariuz’s picture

you 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

josefg’s picture

I'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.

mariuz’s picture

I 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?

Status: Active » Needs work
mariuz’s picture

Issue summary: View changes

Drupal 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

mariuz’s picture

Here is the related issue from pgsql install on drupal 8

ERROR:  relation "variable" does not exist at character 19
STATEMENT:  SELECT value FROM variable WHERE name = 'install_task'

https://www.drupal.org/node/2001350#comment-7723229

apaderno’s picture

Title: Firebird/Interbase Support in Drupal 7 » Add support for Firebird/Interbase
Version: 7.x-dev » 8.0.x-dev
mgifford’s picture

Assigned: nickvidal » Unassigned

Unassigning stale issue. Hopefully someone else will pursue this.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

daffie’s picture

Status: Needs work » Closed (won't fix)

I think this would be best done in a contrib module.

NWOM’s picture

Version: 8.1.x-dev » 9.0.x-dev
Status: Closed (won't fix) » Needs work

This 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.

apaderno’s picture

Status: Needs work » Active

There isn't any patch, so the status cannot be Needs work.

apaderno’s picture

Issue tags: -database, -firebird, -interbase
NWOM’s picture

#3 and #16 include files that can be made into a patch.

apaderno’s picture

@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.

longwave’s picture

Since 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.

Version: 9.0.x-dev » 9.1.x-dev

Drupal 9.0.10 was released on December 3, 2020 and is the final full bugfix release for the Drupal 9.0.x series. Drupal 9.0.x will not receive any further development aside from security fixes. Sites should update to Drupal 9.1.0 to continue receiving regular bug fixes.

Drupal-9-only bug reports should be targeted for the 9.1.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 9.1.x-dev » 9.3.x-dev

Drupal 9.1.10 (June 4, 2021) and Drupal 9.2.10 (November 24, 2021) were the last bugfix releases of those minor version series. Drupal 9 bug reports should be targeted for the 9.3.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.