使用 PHP 连接 firebird 远程
Connect firebird remote using PHP
我正在使用 Ubuntu 18.04,需要将我的页面与 Firebird 远程连接,但无法正常工作。
当使用与 'localhost' 相同的代码时就可以了。
在 123.123.123.12 中,我使用的是正确的地址。
<?php
$conexao = ibase_connect("123.123.123.12/3050:/var/lib/firebird/2.5/data/database.fdb","SYSDBA","masterkey");
$sql = "INSERT INTO CUSTOMERS (CODCLI,NOME,FANTASIA,CNPJ) values ('99998','Tester','Fantasier','00.000.000/0001-00')";
$resultado = ibase_query($conexao, $sql);
ibase_close($conexao);
?>
我发现了问题,Allow ports using UFW not work alone, allow ports using iptables work fine.
正在使用:
iptables -A INPUT -p tcp --dport 3050 -j ACCEPT
我正在使用 Ubuntu 18.04,需要将我的页面与 Firebird 远程连接,但无法正常工作。 当使用与 'localhost' 相同的代码时就可以了。
在 123.123.123.12 中,我使用的是正确的地址。
<?php
$conexao = ibase_connect("123.123.123.12/3050:/var/lib/firebird/2.5/data/database.fdb","SYSDBA","masterkey");
$sql = "INSERT INTO CUSTOMERS (CODCLI,NOME,FANTASIA,CNPJ) values ('99998','Tester','Fantasier','00.000.000/0001-00')";
$resultado = ibase_query($conexao, $sql);
ibase_close($conexao);
?>
我发现了问题,Allow ports using UFW not work alone, allow ports using iptables work fine.
正在使用:
iptables -A INPUT -p tcp --dport 3050 -j ACCEPT