Editor with Firebird
Editor with Firebird
Hi, I would like to use Editor with Firebird, but I get an error message:
{"error":"An error occurred while connecting to the database 'test'. The error reported by the server was: SQLSTATE[HY000] [335544323] file is not a valid database"}
OR
{"error":"An error occurred while connecting to the database '\/hdd\/teszt\/XXXXX.FDB'. The error reported by the server was: SQLSTATE[HY000] [335544323] file is not a valid database"}
How should I use db param?
$sql_details = array(
"type" => "Firebird", // Database type: "Mysql", "Postgres", "Sqlserver", "Sqlite" or "Oracle"
"user" => "username", // Database user name
"pass" => "password", // Database password
"host" => "localhost", // Database host
"port" => "", // Database connection port (can be left empty for default)
"db" => "/hdd/teszt/XXXXX.FDB", // Database name
"dsn" => "", // PHP DSN extra information. Set as charset=utf8mb4
if you are using MySQL
"pdoAttr" => array() // PHP PDO attributes array. See the PHP documentation for all options
);
Thanks,
Viktor
This question has an accepted answers - jump to answer
Answers
I was going to say that we don’t support Firebird, but actually, looking at the drivers, there is a Firebird driver there from four years ago.
Can you show me how you would normally connect to your Firebird database with PDO and I’ll check that against what Editor does.
Thanks,
Allan
I need to change config.php:
and FirebirdQuery.php:
this line:
"firebird:{$host}dbname={$db}".self::dsnPostfix( $dsn ),
to
"firebird:dbname=serverhost:/hdd/teszt/XXXXXX.FDB".self::dsnPostfix( $dsn )
It works well.
A simple script to connect:
```
<?php > ``` ?><?php
$username = 'username';
$password = 'password';
$dsn = 'firebird:dbname=serverhost:/hdd/teszt/XXXXX.FDB';
Thank you for your help,
Viktor
Hi Viktor,
Many thanks! It looks like if you use:
Then that should result in a successful connection without modifying the library code?
Allan
Hi Allan,
In this case got an error:
{"error":"An error occurred while connecting to the database '\/hdd\/teszt\/XXXXX.FDB'. The error reported by the server was: SQLSTATE[HY000] [335544323] file is not a valid database"}
Viktor
Interesting! Good to hear you have a workaround for now though
Allan