I can run the following code with DBI
but in Apache::DBI.

#!/usr/bin/perl -w

use DBI;
sub connect{
$dbh = DBI->connect("dbi:Pg:dbname=test", "canis",$password);

$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;



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.




-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html

Reply via email to