<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=DE link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span lang=EN-US>Hi,<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> I got the following message after updating
Lib::XML and Lib::XSLT :<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Access denied for user 'koha'@'localhost'
(using password: YES) at /usr/share/koha/lib/C4/Context.pm line 646.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Context.pm line 646:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>### $context<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> ##correct name for db_schme <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> my $db_driver;<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> if ($context->config("db_scheme")){<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>
$db_driver=db_scheme2dbi($context->config("db_scheme"));<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> }else{<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> $db_driver="mysql";<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> }<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US> my $db_name =
$context->config("database");<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> my $db_host =
$context->config("hostname");<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> my $db_port =
$context->config("port") || '';<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> my $db_user =
$context->config("user");<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> my $db_passwd =
$context->config("pass");<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> # MJR added or die here, as we can't
work without dbh<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> my $dbh=
DBI->connect("DBI:$db_driver:dbname=$db_name;host=$db_host;port=$db_port",<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> </span>$db_user,
$db_passwd) or die $DBI::errstr;<o:p></o:p></p>
<p class=MsoNormal> <span lang=EN-US>my $tz = $ENV{TZ};<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> if ( $db_driver eq 'mysql' ) { <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> # Koha 3.0 is utf-8, so force utf8
communication between mySQL and koha, whatever the mysql default config.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> # this is better than modifying
my.cnf (and forcing all communications to be in utf8)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> $dbh->{'mysql_enable_utf8'}=1;
#enable<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> $dbh->do("set NAMES
'utf8'");<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> ($tz) and $dbh->do(qq(SET
time_zone = "$tz"));<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> }<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> elsif ( $db_driver eq 'Pg' ) {<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> $dbh->do( "set
client_encoding = 'UTF8';" );<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> ($tz) and $dbh->do(qq(SET TIME
ZONE = "$tz"));<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> </span>}<o:p></o:p></p>
<p class=MsoNormal> return $dbh;<o:p></o:p></p>
<p class=MsoNormal>}<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Hope for somebodies help.<o:p></o:p></p>
<p class=MsoNormal>Sven<o:p></o:p></p>
</div>
</body>
</html>