Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
e80536e6
Commit
e80536e6
authored
May 29, 2017
by
Francesc Guasch
Browse files
[#248] Fixed remote db connection
parent
fea154a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/Ravada.pm
View file @
e80536e6
...
...
@@ -351,7 +351,13 @@ sub _connect_dbh {
my
$db_user
=
(
$CONFIG
->
{
db
}
->
{
user
}
or
getpwnam
(
$>
));;
my
$db_pass
=
(
$CONFIG
->
{
db
}
->
{
password
}
or
undef
);
my
$db
=
(
$CONFIG
->
{
db
}
->
{
db
}
or
'
ravada
'
);
return
DBIx::
Connector
->
new
("
DBI:
$driver
:
$db
"
my
$host
=
$CONFIG
->
{
db
}
->
{
host
};
my
$data_source
=
"
DBI:
$driver
:
$db
";
$data_source
=
"
DBI:
$driver
:database=
$db
;host=
$host
"
if
$host
&&
$host
ne
'
localhost
';
return
DBIx::
Connector
->
new
(
$data_source
,
$db_user
,
$db_pass
,{
RaiseError
=>
1
,
PrintError
=>
0
});
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment