It looks like your PostgreSQL installation is trying to do IDENT authentication, instead of MD5. So, it's checking the user your script is running as, and trusting that since you managed to log on with your username/password already, it'll trust you to log into the database.
While this isn't strictly an Apache problem, but rather a database problem, here's what's probably the matter. In your /var/lib/pgsql/data/pg_hba.conf file, you probably have the default: local all all trust I would suggest changing this to something like: local all all md5 or make it IP based: host all all 1.2.3.4 255.255.255.255 md5 you get the idea. That way, it'll obey the username/password that you supply. On Thursday 28 August 2003 04:28 pm, wrote: > Hello, every body > > I can run the following subroutine in DBI, but Apache::DBI... > > > use DBI; > > sub connect{ > $dbh = DBI->connect("dbi:Pg:dbname=test", "canis","3dsadasz"); > > $sth = $dbh->prepare("SELECT clave, denominacion FROM Marca") > > || die $dbh->errstr; > > $sth->execute() || die $sth->errstr; > > while(my $row = $sth->fetch){ > my($clave, $nombre) = @$row; > print "clave => $clave, denominacion => $nombre\n"; > } > $dbh->disconnect; > } > and I have this log... > > [Thu Aug 28 12:36:44 2003] [error] (2)No such file or directory: > mod_mime_magic: can't read magic file /etc/apache-perl/share/magic > [Thu Aug 28 12:36:45 2003] [notice] Apache/1.3.26 (Unix) Debian GNU/Linux > mod_perl/1.26 configured -- resuming normal operations > [Thu Aug 28 12:36:45 2003] [notice] suEXEC mechanism enabled (wrapper: > /usr/lib/apache/suexec) > [Thu Aug 28 12:36:45 2003] [notice] Accept mutex: sysvsem (Default: > sysvsem) [Thu Aug 28 12:37:03 2003] null: DBI->connect(dbname=test) failed: > FATAL 1: IDENT authentication failed for user "canis" at > /var/lib/perl/JCVA/Conexion.pm line 11 > [Thu Aug 28 12:37:03 2003] [error] Can't call method "prepare" on an > undefined value at /var/lib/perl/JCVA/Conexion.pm line 13. > Somedody knows if the user must be registered in some configuration file? -- /* Michael A. Nachbaur <[EMAIL PROTECTED]> * http://nachbaur.com/pgpkey.asc */ "Another world, another day, another dawn. " -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html