dongza1708 2015-05-22 07:10
浏览 280
已采纳

“与远程接口拒绝的连接”使用PDO连接到Firebird 3

Try code below, but cause exception - SQLSTATE[HY000] [335544421] connection rejected by remote interface:

try {
    $dbh = new PDO("firebird:dbname=localhost/3050:empty", "SYSDBA", "masterkey");
    $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    $sth = $dbh->query('SELECT idmspos, idmsqnt, cdmsval from svc$dms'); 
    $sth->setFetchMode(PDO::FETCH_ASSOC); 

    while($row = $sth->fetch()) {  
        echo $row['idmspos']." ".$row['idmsqnt']." ".$row['cdmsval']."<br>";  
    }

    $dbh = null;
}
catch(PDOException $e) {
    $dbh = null;
    echo $e->getMessage();
}

Specs:

Linux 3.2.0-4-686-pae #1 SMP Debian 3.2.65-1+deb7u1 i686 GNU/Linux
PHP 5.6
php5-interbase
Firebird 3 from official site. Server is worked, can connect to him from local and remote machine.
  • 写回答

2条回答 默认 最新

  • doujin8673 2015-05-22 13:00
    关注

    Find firebird.conf, uncomment (if using fbclient 2.x) and change the following parameters to disable WireCrypt and set higher priority for legacy authentication:

    WireCrypt = Disabled
    AuthServer = Legacy_Auth, Srp, Win_Sspi
    AuthClient = Legacy_Auth, Srp, Win_Sspi
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试