“connection rejected by remote interface” connecting to Firebird 3 with PDO

♀尐吖头ヾ 提交于 2019-12-04 10:40:37

问题


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.

回答1:


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



回答2:


You need to change the Firebird service as follows:

  1. Install Firebird
  2. Go search Services-> Firebird
  3. Right click on Firebird->Properties-> LogOn-> and tick checkbox having option as "Allows services to interact with Desktop"
  4. and then click on Restart service

    You are now able to connect with firebird successfully in case of Firebird 2.1.



来源:https://stackoverflow.com/questions/30390465/connection-rejected-by-remote-interface-connecting-to-firebird-3-with-pdo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!