If you have a database alias on the server "localhost" called "test.fdb", you can do:
$conn = new PDO("firebird:dbname=localhost:test.fdb",
'SYSDBA','letmein');
Note that as of the time of writing, the Firebird driver doesn't correctly throw an exception on connection error
http://bugs.php.net/bug.php?id=41522
Fonctions Firebird/Interbase (PDO_FIREBIRD)
Introduction
Avertissement
PDO_FIREBIRD est un pilote qui implémente l'interface de
PHP Data Objects (PDO) pour
permettre l'accès de PHP aux bases de données Firebird et Interbase.
Ce module est EXPERIMENTAL. Cela signifie que le comportement de ces fonctions, leurs noms et, concrètement, TOUT ce qui est documenté ici peut changer dans un futur proche, SANS PREAVIS ! Soyez-en conscient, et utilisez ce module à vos risques et périls.
Sommaire
- PDO_FIREBIRD DSN — Connexion aux bases de données Firebird et Interbase
Firebird/Interbase (PDO)
mark-php at vectrex dot org dot uk
03-Jun-2007 12:15
03-Jun-2007 12:15
Darren
08-Mar-2006 02:18
08-Mar-2006 02:18
After much trial and error i found out you should use the following to connect to a firebird database:
<?php
$db = new PDO ("firebird:dbname=localhost:C:\\path\\to\\database\\MyDatabase.FDB", "username", "password");
?>
NOTE: in the 1st part of the connection string there can be NO spaces else you will get NULL.
The string provided on this site does not work and will give no error only NULL.
thomas at last-it dot de
04-Feb-2006 02:52
04-Feb-2006 02:52
if youre dsn syntax is wrong, see ritsaert's comment, there maybe no errormessage!
ritsaert at continuit dot nl
19-Dec-2005 03:43
19-Dec-2005 03:43
The connection string for a firebird PDO connection is different than described above. It is something like:
$DB = new PDO("firebird:dbname=T:\\Klimreg.GDB", "SYSDBA", "masterkey");
after dbname= the default connection string for Interbase and Firebird databases is used as presented to either gds32.dll or fbclient.dll.
