PHP未连接firebird(interbase)数据库

PHP未连接firebird(interbase)数据库,php,firebird,interbase,Php,Firebird,Interbase,我有一个遗留系统要维护,在生产中,这个系统运行正常,但在我的开发机器中,我无法连接到数据库。 我的操作系统是Ubuntu 14.04,新安装了firebird2.5-classic,php版本是5.5.9-1ubuntu4.5,我还安装了interbase驱动程序 当我运行此代码时: $host = 'localhost:/var/www/html/webcalc/base/dbwebcalc.gdb'; $dbh = ibase_connect($host, 'SYSDBA', 'maste

我有一个遗留系统要维护,在生产中,这个系统运行正常,但在我的开发机器中,我无法连接到数据库。 我的操作系统是Ubuntu 14.04,新安装了firebird2.5-classic,php版本是5.5.9-1ubuntu4.5,我还安装了interbase驱动程序

当我运行此代码时:

$host = 'localhost:/var/www/html/webcalc/base/dbwebcalc.gdb';

$dbh = ibase_connect($host, 'SYSDBA', 'masterkey');

var_dump($dbh);
我收到此回信:

Warning: ibase_connect(): Your user name and password are not defined. Ask your database administrator to set up a Firebird login**. in /var/www/html/testes/conn_firebird.php on line 5.
但是,当我尝试从命令行连接时,连接已经建立。 所以,我想问题一定出在司机身上

在我的
/etc/firebid//SYSDBA.password文件中,密码匹配,因此,我认为配置是正确的。

尝试自动删除

sudo apt-get autoremove firebird2.5-classic
安装

sudo apt-get install firebird2.5-classic
并尝试改变gsec的效用

gsec -database localhost:/var/lib/firebird/2.5/system/security.fdb
GSEC> modify SYSDBA -pw masterke

编辑
php.ini

; Default database name for ibase_connect().

ibase.default_db = 127.0.0.1:E:\path_to_bd\bd.fdb  ;(or whatever the path to bd is..mabe a port is needed: 127.0.0.1/3050:E:\path_to_bd\bd.fdb)

; Default username for ibase_connect().

ibase.default_user = "username"

; Default password for ibase_connect().

ibase.default_password = "yourpassword"

难看的解决方案,但很管用。

尝试用您的ip地址替换localhost:。不要太管用:(感谢你的回答,KiPSOFT。我做到了,我更改了SYSDBA密码,并向security2数据库添加了一个用户。情况仍然是一样的:从命令行我可以连接,从应用程序不可以连接。)(