in reply to Getting a Perl connection to a Firebird2.1-classic database in Kubuntu 9.10

Hi Guys,

Well thank you for all your input.

I specially want to thank 'almut' for the *-dev hint, 'CountZero' for reading through the Makfile.PL, amazing dedication to duty, and 'mapopa' for taking me down the final few yards and of course everyone else for keeping my moral up.

OK, now the answer we've all been waiting for:

Firebird2.1, any version, installs fairly easily on Kubuntu 9.10 with apt-get or KPackage, but you have to start the service with:

sudo dpkg-reconfigure firebird2.1-classic

,which hangs but don't worry it's still done the job, or

 sudo dpkg-reconfigure firebird2.1-super

which doesn't.

Then you install firebird2.1-dev and DBI, again, with apt-get or KPackage. Now to get DBD::InterBase, it's the paths that throw you. Here is the script:

wget http://search.cpan.org/CPAN/authors/id/E/ED/EDPRATOMO/DBD-InterBa +se-0.48.tar.gz tar -zxvf DBD-InterBase-0.48.tar.gz cd DBD-InterBase-0.48 perl Makefile.PL bin directory : /usr/lib/firebird/2.1/bin include directory : /usr/include lib directory : /usr/lib libfbembed? (y/n) [n] Full path to your test database: /tmp/foo/test.fdb Username : SYSDBA Password : masterkey make make test (optional step) make install

If you haven't started the service, none of the tests will pass, in fact it still hung with me anyway, but ctrl-c is a wonderful invention.

Finally the install worked perfectly and I'm now back to debugging.

Thanks again for all your hard work.

Regards

Steve

  • Comment on Re: Getting a Perl connection to a Firebird2.1-classic database in Kubuntu 9.10 [SOLUTION]
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: Getting a Perl connection to a Firebird2.1-classic database in Kubuntu 9.10 [SOLUTION]
by Steve_BZ (Chaplain) on Nov 13, 2009 at 14:11 UTC
    OK, well here's the rub. Having spent weeks getting DBD:InterBase working, it's absolutely horrible with 2.1. Acording to the doc, it's been tested with 1.5, so although it works after a fashion, it mangles dates, truncates fields and crashes doing a while/fetch. So, very disapointing. However, ODBC has mysteriously sprung into life, maybe it was the transition to Kubuntu 9.10, which seems more stable, for firebird at least. Anyway here are the ODBC instructions, which I found somewhere, I'd like to give credit, but sadly I can't remember:

    Installing the Firebird Database ODBC Driver

    The Firebird ODBC driver is not in the Ubuntu repositories so it has to be downloaded from the FirebirdSQL site: http://www.firebirdsql.org/download/prerelease/odbc/OdbcFb-LIB-RC1-2.0.0148.i686.tar.gz

    It contains a single file named "libOdbcFb.so". Copy this file to the /usr/lib directory.

    Next make sure you have the Firebird client library installed: apt-get install libfbclient2

    Openoffice and probably a few other programs will insist on using a driver named libgds.so for connecting to a Firebird database. A symbolic link will have to be created:

    nb: I didn't do this ln -s /usr/lib/libfbclient.so.2 /usr/lib/libgds.so At this point you are ready to add some entries to the odbc config files. If they don't already exist you can create them.

    Here's another example odbc.ini:

    [DBNAME] Description = Firebird Driver = Firebird Dbname = localhost:/var/lib/firebird/2.1/data/employee.fdb User = SYSDBA Password = xxxxx Role = CharacterSet = ReadOnly = No NoWait = No

    And the relevant entries for the odbcinst.ini file:

    [Firebird] Description = InterBase/Firebird ODBC Driver Driver = /usr/lib/libOdbcFb.so Setup = /usr/lib/libOdbcFbS.so Threading = 1 FileUsage = 1 CPTimeout = CPReuse =

    You should now be able to connect to DBNAME from OpenOffice or other programs using the ODBC connection method.

    Regards

    Steve