Closed danillo10 closed 6 years ago
In the providers
array, preferably in the Package Service Providers
section:
/*
* Package Service Providers...
*/
'Firebird\FirebirdServiceProvider',
"Cannot connect to Firebird Database, no host or path supplied"
'firebird' => [
'driver' => 'firebird',
'host' => env('DB_HOST', 'localhost'),
'database' => env('DB_DATABASE','/storage/firebird/BD.FDB'),
'username' => env('DB_USERNAME', 'sysdba'),
'password' => env('DB_PASSWORD', 'masterkey'),
'charset' => env('DB_CHARSET', 'WIN1252'),
]
PDOException (335544344) SQLSTATE[HY000] [335544344] I/O error during "CreateFile (open)" operation for file "/storage/firebird/BD.FDB"
MY DB IS ON: /storage/firebird/bd.fdb
I would suggest checking folder permissions, also use the storage_path()
helper here as it will use the full path name.
I'm try this, but:
PDOException (335544375) SQLSTATE[HY000] [335544375] unavailable database
'firebird' => [ 'driver' => 'firebird', 'host' => env('DB_HOST', 'localhost'), 'database' => env('DB_DATABASE','localhost:C:\Danillo\BD.FDB'), 'username' => env('DB_USERNAME', 'sysdba'), 'password' => env('DB_PASSWORD', 'masterkey'), 'charset' => env('DB_CHARSET', 'WIN1252'), ]
There's no need to repeat the localhost
as the config takes care of that already.
'firebird' => [ 'driver' => 'firebird', 'host' => env('DB_HOST', 'localhost'), 'database' => env('DB_DATABASE','C:\Danillo\BD.FDB'), 'username' => env('DB_USERNAME', 'sysdba'), 'password' => env('DB_PASSWORD', 'masterkey'), 'charset' => env('DB_CHARSET', 'WIN1252'), ]
Solved!
Glad to hear it.
My config/app.php