Hi Ron
More info...
On Tue, 2008-09-16 at 10:34 +1000, Ron Savage wrote:
> Hi Folks
>
> OS: Debian.
>
> I just used aptitude to install Postgres V 8.3.3, and recompiled DBD::Pg
> V 2.10.3.
>
> >From the command line I can connect to Postgres, but via a CGI script or
> mod_perl handler I'm getting:
>
> <==><8==>
> [Tue Sep 16 10:23:24 2008] [notice] Apache/2.2.9 (Unix) mod_ssl/2.2.9
> OpenSSL/0.9.8g mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0
> configured -- resuming normal operations
> DBI connect('dbname=contacts','ron',...) failed: FATAL: Ident
> authentication failed for user "ron"
> at /home/ron/perl.modules/Local-Contacts/lib/Local/Contacts/App/Database.pm
> line 184
> [Dispatch] ERROR: Can't connect to data source '' because I can't work
> out what driver to use (it doesn't seem to contain a 'dbi:driver:'
> prefix and the DBI_DRIVER env var is not set)
> at /usr/local/share/perl/5.10.0/Log/Dispatch/DBI.pm line 31
> <==><8==>
I just rigged the code which constructs the DSN to double up on the prefix:
my($dsn) = "dbi:Pg:dbi:Pg:dbname=$database";
return [$dsn, $username, $password];
and now get this:
<==><8==>
[Tue Sep 16 10:58:16 2008] [notice] Apache/2.2.9 (Unix) mod_ssl/2.2.9
OpenSSL/0.9.8g mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0
configured -- resuming normal operations
DBI connect('dbi:Pg:dbname=contacts','ron',...) failed: invalid
connection option "dbi:Pg:dbname"
at /home/ron/perl.modules/Local-Contacts/lib/Local/Contacts/App/Database.pm
line 184
[Dispatch] ERROR: Can't connect to data source '' because I can't work
out what driver to use (it doesn't seem to contain a 'dbi:driver:'
prefix and the DBI_DRIVER env var is not set)
at /usr/local/share/perl/5.10.0/Log/Dispatch/DBI.pm line 31
<==><8==>
Is it just me, or is DBD::Pg creating a problem here?
--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html