[gull] authentification CGI - DBI perl dans PostgreSQL
Amel Kapetanovic
a.kapetanovic at hispeed.ch
Sat Mar 18 09:16:09 CET 2006
Bonjour,
Je ne comprends pas quelque-chose : je n'arrive pas à m'authentifier
dans PostgreSQL autrement qu'en utilisateur www-data avec mes scripts.
Par exemple :
-----------------------------------------------------------
#!/usr/bin/perl -w
use strict;
use CGI;
use DBI;
my $data_source = "dbi:Pg:database=kdb_cust;host=debian;port=5432";
my $username = 'amel';
my $password = 'xyz';
my $msg = 'OK';
my $dbh = DBI->connect($data_source, $username, $password);
if (!defined($dbh)) {
$msg = $DBI::errstr;
}else{
$dbh->disconnect;
}
my $q = new CGI;
print $q->header,
$q->start_html('hello'),$q->h1('hello'),$q->h2($msg),$q->end_html;
exit(0);
et le log de pg :
-----------------------------------------------------------
2006-03-18 09:12:10 [5044] TRACE: Connexion reçue : hôte=127.0.0.1
port=32859
2006-03-18 09:12:10 [5044] FATAL: IDENT authentication échouée pour
l'utilisateur "amel"
:(
Est-ce-que quelqu'un peut m'aider, SVP ??
Merci d'avance,
Amel Kapetanovic
More information about the gull
mailing list