DevOps (laset) wrote in lj_dev,
DevOps
laset
lj_dev

a BAG? Role.pm line 230

Hi

What's the problem with Role.pm line 230?

[Checking LJ Environment...]
Use of uninitialized value in concatenation (.) or string at /home/lj/public_html/cgi-bin/DBI/Role.pm line 230.
Use of uninitialized value in concatenation (.) or string at /home/lj/public_html/cgi-bin/DBI/Role.pm line 230.

Problem:
  * Couldn't get master database handle.


the same anresolved issues here and here

I'd greatly appriciate any help. Thanks!

Role.pm
...
sub make_dbh_fdsn
{
    my $self = shift;
    my $db = shift;   # hashref with DSN info
    return $db->{'_fdsn'} if $db->{'_fdsn'};  # already made?

    my $fdsn = "DBI:mysql";  # join("|",$dsn,$user,$pass) (because no refs as hash keys)
    $db->{'dbname'} ||= $self->{'DEFAULT_DB'} if $self->{'DEFAULT_DB'};
    $fdsn .= ":$db->{'dbname'}";
    $fdsn .= ";host=$db->{'host'}" if $db->{'host'};
    $fdsn .= ";port=$db->{'port'}" if $db->{'port'};
    $fdsn .= ";mysql_socket=$db->{'sock'}" if $db->{'sock'};
230 $fdsn .= "|$db->{'user'}|$db->{'pass'}";

    $db->{'_fdsn'} = $fdsn;
    return $fdsn;
}
...
ljconfig.pl
...
    %DBINFO = (
                   # master must be named 'master'
               'master' => {
                   'host' => "localhost",
                   'port' => 2083,
                   'dbname' => 'lj_db',
                   'user' => 'lj_user',
                   'pass' => 'pass',
                   'role' => {
                       'cluster1' => 1,

                       # optionally, apache write its access logs to a mysql database
                       #logs => 1,
                   },
               },
               # example of a TCP-based DB connection
               # ....
               # example of a UNIX domain-socket DB connection
               # ...
               );
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 3 comments