I can connect to my interbase using IBConsole using the same user/pass as I use in php
php --version
PHP 5.6.13-0+deb8u1 (cli) (built: Sep 7 2015 13:38:37)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
Installed interbase: apt-get install libapache2-mod-php5 php5-interbase
phpinfo() returns:
Firebird/InterBase Support: dynamic
Compile-time Client Library Version: Firebird API version 25
Run-time Client Library Version LI-V6.3.3.26778: Firebird 2.5
PDO drivers enabled: firebird, mysql
PDO_Firebird, PDO Driver for Firebird: enabled
Firebird driver for PDO: Ard Biesheuvel
php test 1:
$host = 'MYSRV1:C:\folder\dbhms.ib';
$username = 'dbuser';
$password= 'dbpassword';
$conStr = "firebird:dbname={$host};User={$username};Password={$password};Port=3050;";
$DB = new PDO($conStr);
result:
PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [335544472] Your user name and password are not defined. Ask your database administrator to set up a Firebird login.' in /home/tr/ibase/test.php:29
php test 2:
print_r(PDO::getAvailableDrivers());
result:
;Array
(
[0] => firebird
[1] => mysql
)
Php documentation for PDO::getAvailableDrivers on http://php.net/manual/en/pdo.getavailabledrivers.php:
print_r(PDO::getAvailableDrivers());
result:
Array
(
[0] => mysql
[1] => sqlite
)
I notice that there is a leading ';' in my test 2 (;Array ) but it should not cause any trouble
What am I missing?