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
Firebird/Interbase Functions (PDO_FIREBIRD)
Увод
Това разширение е ЕКСПЕРИМЕНТАЛНО. Поведението на разширението, включително имената на функциите и всичко останало, което е документирано за това разширение, могат да бъдат променени без предупреждение в бъдеща версия на PHP. Това разширение би трябвало да бъде използвано единствено на ваша собствена отговорност.
Предварително-дефинирани константи
Константите по-долу са дефинирани от този драйвер и ще бъдат достъпни само, когато разширението или е компилирано с PHP или динамично заредено по време на изпълнение. Освен това, тези характерни за драйвера константи трябва да се използват само ако използвате този драйвер. Употребата на характерни за mysql атрибути с postgres драйвер може да предизвикат неочаквано поведение. Метода PDO::getAttribute() може да се използва за да се види атрибута PDO_ATTR_DRIVER_NAME и да се провери в драйвера, дали кода може да работи с множество драйвери
Съдържание
- PDO_FIREBIRD DSN — Connecting to Firebird and Interbase databases
Firebird/Interbase (PDO)
03-Jun-2007 10:15
08-Mar-2006 01: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.
04-Feb-2006 01:52
if youre dsn syntax is wrong, see ritsaert's comment, there maybe no errormessage!
19-Dec-2005 02: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.
