0

I am trying to connect to an external firebird database using php pdo. I get the message:

SQLSTATE[HY000] [335544721] Unable to complete network request to host "192.168.0.10"

My firebird server 64 bit windows and firebird version is 64bit version 2.1 I can connect to firebird locally from this server using php pdo.

My web server is 64bit linux server and I can not connect to firebird but I can connect using isql-fb utility.

I have been googling for a week but I have zero :(

Thanks in advance.

My question is marked as duplicated but mine is different. I can connect with console, I can not connect with php. But I can connect with php from localhost.

$dsn = 'firebird:DataSource=192.168.0.10;Database=C:\Ofisnet\Data\SAV2012.FDB;charset=UTF8;';
echo $dsn . '<br>';
$userName = "SYSDBA";
$password = "password";
$conn = new SafePDO($dsn, $userName, $password);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
error_reporting(E_ERROR);
hdayi
  • 423
  • 2
  • 4
  • 13
  • 1
    are you sure the firebird server is on the 192.168.0.10 IP and there is no firewall rule preventing communications? Are you sure your web site and the database are in the one and the same IP sub-net ? so the web-site is also 192.168.0.x and - that is the same 192.168.0.x subnetwork,. not some another subnetwork with the same addresses ? Are you sure the firebird on the target server is LISTENING on the same port, that your PHP is connecting to? Basically, it is nothing about Firebird - it is about generic TCP/IP diagnostic. Take WireShark or other monitor and check connection signal propagates – Arioch 'The Jun 27 '17 at 09:01
  • tcp traceroute might also help, from the PHP machine. But it also available for UNIX, WinXP SP3 prohibited it. Like https://en.wikipedia.org/wiki/Layer_four_traceroute - you would have to learn which port PHP uses for connection attempt, which port the firebird server is listening at - they should match. Then you tcp-traceroute the TCP connection to that equal port number from PHP machine to Firebird machine and see where connection fails to propagate. – Arioch 'The Jun 27 '17 at 09:06
  • 1
    Check this question: https://stackoverflow.com/questions/22338165/firebird-unable-to-complete-network-request-to-host – Marcodor Jun 27 '17 at 13:59

1 Answers1

-1

In Firebird on linux the database name and maybe user login is case sensitive.

If no work, please share more specifics.

LifeOrYou
  • 13
  • 1
  • it does not go to the authentication - it fails to even connect to server process. Maybe the server is just shutdown completely. But year, more details needed like connection strings, etc. – Arioch 'The Jun 27 '17 at 09:02
  • An authentication failure would produce a different error message. – Mark Rotteveel Jun 27 '17 at 09:41