1

I'm trying to connect a Laravel 5.5 application to a Firebird 4.0 database, but I keep getting this error:

PDOException: SQLSTATE[HY000] [335544721] Unable to complete network request to host

I'm also using the jacquestvanzuydam\laravel-firebird package to connect. Checking the firebird.log on my server, there are no info showing up.

The connection configuration I'm using is

    'firebird2' => [
        'driver'   => 'firebird',
        'host'     => env('DB_HOST', 'xxx.xxx.xxx.xxx'),
        'port'     => env('DB_PORT', '3060'),
        'database' => env('DB_DATABASE', '/home/database/sample.fdb'),
        'username' => env('DB_USERNAME', 'sysdba'),
        'password' => env('DB_PASSWORD', 'masterkey'),
        'charset'  => env('DB_CHARSET', 'WIN1252'),
        'collation' => 'WIN1252',
    ],

The port I'm using is 3060.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
  • Hello Rogerio, It sounds familiar to me. What OS are you using? Can you share the samples parameters you are using to connect to the fb db? – Héctor William Nov 08 '21 at 12:05
  • Hello Hector, i'm using Win10 on my PC and Ubuntu on db server, i've edited the question with the connection parameters, the info comes from another dabase to validate the login. – Rogério Marcon Nov 08 '21 at 12:12
  • Your parameters seems to be right, can you connect to the database from other client? Do yo have a client on your computer to test the connection? Maybe your machine is not reaching the host. – Héctor William Nov 08 '21 at 12:31
  • We have a software that connects to the same database. it connects just right – Rogério Marcon Nov 08 '21 at 12:35
  • After recheck my parameters, i found a error, i should've used /3060 on the host IP. after that i got another error: PDOException: SQLSTATE[HY000] [335544472] Your user name and password are not defined. Ask your database administrator to set up a Firebird login. – Rogério Marcon Nov 08 '21 at 14:12
  • Well, it seems like that database has its own configuration, all db I manage use port 3050, and the default sysdba/masterkey are disabled. – Héctor William Nov 08 '21 at 20:04
  • Could you doble check the software client configuration against what you're currently trying? – Héctor William Nov 08 '21 at 20:05
  • Hello, i already double checked it a couple of times, the configuration is the same in both of them. – Rogério Marcon Nov 08 '21 at 20:36
  • I remember something about the charset and the credentials, it may vary between databases, try others like ``CHARSET=win1254``, that's the most used, it that doesn't help you, I don't have anything else. – Héctor William Nov 08 '21 at 20:50
  • Right, i'm gonna give it a try, thank for the help for now – Rogério Marcon Nov 08 '21 at 20:56
  • On the machine running Laravel, do you have the Firebird 4.0 client library installed (as opposed to, say, the Firebird 2.5 client library (fbclient.dll/libfbclient.so))? Firebird 3.0 introduced new authentication plugins, and if your client library doesn't support those, and the user was created for such a plugin, then authentication will fail. As an aside, the library you're using was abandoned, and there are more recent forks that continue development. – Mark Rotteveel Nov 09 '21 at 09:31
  • Hey, on my machine i have both 2.5 and 4.0 installed. I already took a look on some new libraries, if i choose to change the package i'm using, do i need to upgrade my laravel to 6 or up? – Rogério Marcon Nov 09 '21 at 10:58

0 Answers0