Hi Tim
On Tue, 2008-09-16 at 09:53 +0100, Tim Bunce wrote:
> Use DBI->trace() (or DBI_TRACE env var) to see what's happening.
Thanx.
(1) The failure via the mod_perl route (Apache::DBI not in use):
[Wed Sep 17 09:14:20 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 1.605-ithread default trace level set to 0x0/15 (pid 27667) at
Database.pm line 184 via Base.pm line 97
-> DBI->connect(dbi:Pg:dbname=contacts, ron, ****)
-> DBI->install_driver(Pg) for linux perl=5.010000 pid=27667 ruid=1
euid=1
install_driver: DBD::Pg version 2.10.3 loaded
from /usr/local/lib/perl/5.10.0/DBD/Pg.pm
New 'DBI::dr' (for DBD::Pg::dr, parent='', id=undef)
dbih_setup_handle(DBI::dr=HASH(0xa355f80)=>DBI::dr=HASH(0xa355fe0),
DBD::Pg::dr, 0, Null!)
dbih_make_com(Null!, 0, DBD::Pg::dr, 84, 0) thr#9955cc8
dbih_setup_attrib(DBI::dr=HASH(0xa355fe0), Err, Null!)
SCALAR(0x9b09308) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0xa355fe0), State, Null!)
SCALAR(0x9b092b8) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0xa355fe0), Errstr, Null!)
SCALAR(0x9b092e8) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0xa355fe0), TraceLevel, Null!) 0
(already defined)
dbih_setup_attrib(DBI::dr=HASH(0xa355fe0), FetchHashKeyName, Null!)
'NAME' (already defined)
install_method DBI::db::pg_cancel
install_method DBI::db::pg_endcopy
install_method DBI::db::pg_getline
install_method DBI::db::pg_getcopydata
install_method DBI::db::pg_getcopydata_async
install_method DBI::db::pg_notifies
install_method DBI::db::pg_putcopydata
install_method DBI::db::pg_putcopyend
install_method DBI::db::pg_ping
install_method DBI::db::pg_putline
install_method DBI::db::pg_ready
install_method DBI::db::pg_release
install_method DBI::db::pg_result
install_method DBI::db::pg_rollback_to
install_method DBI::db::pg_savepoint
install_method DBI::db::pg_server_trace
install_method DBI::db::pg_server_untrace
install_method DBI::db::pg_type_info
install_method DBI::st::pg_cancel
install_method DBI::st::pg_result
install_method DBI::st::pg_ready
<- install_driver= DBI::dr=HASH(0xa355f80)
>> connect DISPATCH (DBI::dr=HASH(0xa355f80) rc2/3 @5 g0 ima8001
pid#27667) at /usr/local/lib/perl/5.10.0/DBI.pm line 638 via
at /home/ron/perl.modules/Local-Contacts/lib/Local/Contacts/App/Base.pm
line 97
!! warn: 0 CLEARED by call to connect method
-> connect for DBD::Pg::dr (DBI::dr=HASH(0xa355f80)~0xa355fe0
'dbname=contacts' 'ron' **** HASH(0x9bc1d18)) thr#9955cc8
New 'DBI::db' (for DBD::Pg::db, parent=DBI::dr=HASH(0xa355fe0),
id=undef)
dbih_setup_handle(DBI::db=HASH(0xa37c158)=>DBI::db=HASH(0xa37c0a8),
DBD::Pg::db, a129d48, Null!)
dbih_make_com(DBI::dr=HASH(0xa355fe0), a3774b8, DBD::Pg::db, 140, 0)
thr#9955cc8
dbih_setup_attrib(DBI::db=HASH(0xa37c0a8), Err,
DBI::dr=HASH(0xa355fe0)) SCALAR(0xa129f58) (already defined)
dbih_setup_attrib(DBI::db=HASH(0xa37c0a8), State,
DBI::dr=HASH(0xa355fe0)) SCALAR(0xa129fd8) (already defined)
dbih_setup_attrib(DBI::db=HASH(0xa37c0a8), Errstr,
DBI::dr=HASH(0xa355fe0)) SCALAR(0xa129f98) (already defined)
dbih_setup_attrib(DBI::db=HASH(0xa37c0a8), TraceLevel,
DBI::dr=HASH(0xa355fe0)) 0 (already defined)
dbih_setup_attrib(DBI::db=HASH(0xa37c0a8), FetchHashKeyName,
DBI::dr=HASH(0xa355fe0)) 'NAME' (already defined)
dbih_setup_attrib(DBI::db=HASH(0xa37c0a8), HandleSetErr,
DBI::dr=HASH(0xa355fe0)) undef (not defined)
dbih_setup_attrib(DBI::db=HASH(0xa37c0a8), HandleError,
DBI::dr=HASH(0xa355fe0)) undef (not defined)
dbih_setup_attrib(DBI::db=HASH(0xa37c0a8), ReadOnly,
DBI::dr=HASH(0xa355fe0)) undef (not defined)
dbih_setup_attrib(DBI::db=HASH(0xa37c0a8), Profile,
DBI::dr=HASH(0xa355fe0)) undef (not defined)
Begin dbd_db_login
Login connection string: (dbname=contacts user='ron' password='seekrit')
PQconnectdb
Connection complete
PQstatus
PQerrorMessage
Begin pg_error (message: FATAL: Ident authentication failed for user
"ron"
number: 1)
End pg_error
PQfinish
End dbd_db_login (error)
>> DESTROY DISPATCH (DBI::db=HASH(0xa37c158) rc1/1 @1 g0
ima10004 pid#27667) at /usr/local/lib/perl/5.10.0/DBI.pm line 638 via
at /home/ron/perl.modules/Local-Contacts/lib/Local/Contacts/App/Database.pm
line 185
<> DESTROY(DBI::db=HASH(0xa37c158)) ignored for outer handle (inner
DBI::db=HASH(0xa37c0a8) has ref cnt 1)
>> DESTROY DISPATCH (DBI::db=HASH(0xa37c0a8) rc1/1 @1 g0
ima10004 pid#27667) at /usr/local/lib/perl/5.10.0/DBI.pm line 638 via
at /home/ron/perl.modules/Local-Contacts/lib/Local/Contacts/App/Database.pm
line 185
-> DESTROY for DBD::Pg::db (DBI::db=HASH(0xa37c0a8)~INNER)
thr#9955cc8
DESTROY for DBI::db=HASH(0xa37c0a8) ignored - handle not
initialised
ERROR: 1 'FATAL: Ident authentication failed for user
"ron"' (err#0)
<- DESTROY= undef at /usr/local/lib/perl/5.10.0/DBI.pm line 638 via
at /home/ron/perl.modules/Local-Contacts/lib/Local/Contacts/App/Database.pm
line 185
DESTROY (dbih_clearcom) (dbh 0xa37c0a8, com 0xa37ec40, imp
DBD::Pg::db):
FLAGS 0x100011: COMSET Warn PrintWarn
ERR 1
ERRSTR 'FATAL: Ident authentication failed for user "ron"'
PARENT DBI::dr=HASH(0xa355fe0)
KIDS 0 (0 Active)
dbih_clearcom 0xa37c0a8 (com 0xa37ec40, type 2) done.
!! ERROR: 1 'FATAL: Ident authentication failed for user
"ron"' (err#0)
<- connect= undef at /usr/local/lib/perl/5.10.0/DBI.pm line 638 via
at /home/ron/perl.modules/Local-Contacts/lib/Local/Contacts/App/Base.pm
line 97
-> $DBI::errstr (&) FETCH from lasth=HASH
>> DBD::Pg::dr::errstr
<- $DBI::errstr= 'FATAL: Ident authentication failed for user
"ron"'
DBI connect('dbname=contacts','ron',...) failed: FATAL: Ident
authentication failed for user "ron"
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 185
-> DBI->connect(, , ****)
[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
(2) The success via the command line:
[EMAIL PROTECTED]:~/perl.modules/Local-Contacts/lib/Local/Contacts/App$ perl
-I/home/ron/perl.modules/Local-Contacts/lib
~/scripts/Postgres/test.pg.pl
DBI 1.605-ithread default trace level set to 0x0/15 (pid 27814) at
test.pg.pl line 17
-> DBI->connect(dbi:Pg:dbname=contacts, ron, ****)
-> DBI->install_driver(Pg) for linux perl=5.010000 pid=27814
ruid=1000 euid=1000
install_driver: DBD::Pg version 2.10.3 loaded
from /usr/local/lib/perl/5.10.0/DBD/Pg.pm
New 'DBI::dr' (for DBD::Pg::dr, parent='', id=undef)
dbih_setup_handle(DBI::dr=HASH(0x981db68)=>DBI::dr=HASH(0x981dbc8),
DBD::Pg::dr, 0, Null!)
dbih_make_com(Null!, 0, DBD::Pg::dr, 84, 0) thr#978b008
dbih_setup_attrib(DBI::dr=HASH(0x981dbc8), Err, Null!)
SCALAR(0x981e0b8) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x981dbc8), State, Null!)
SCALAR(0x981e068) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x981dbc8), Errstr, Null!)
SCALAR(0x981e0a8) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0x981dbc8), TraceLevel, Null!) 0
(already defined)
dbih_setup_attrib(DBI::dr=HASH(0x981dbc8), FetchHashKeyName, Null!)
'NAME' (already defined)
install_method DBI::db::pg_cancel
install_method DBI::db::pg_endcopy
install_method DBI::db::pg_getline
install_method DBI::db::pg_getcopydata
install_method DBI::db::pg_getcopydata_async
install_method DBI::db::pg_notifies
install_method DBI::db::pg_putcopydata
install_method DBI::db::pg_putcopyend
install_method DBI::db::pg_ping
install_method DBI::db::pg_putline
install_method DBI::db::pg_ready
install_method DBI::db::pg_release
install_method DBI::db::pg_result
install_method DBI::db::pg_rollback_to
install_method DBI::db::pg_savepoint
install_method DBI::db::pg_server_trace
install_method DBI::db::pg_server_untrace
install_method DBI::db::pg_type_info
install_method DBI::st::pg_cancel
install_method DBI::st::pg_result
install_method DBI::st::pg_ready
<- install_driver= DBI::dr=HASH(0x981db68)
>> connect DISPATCH (DBI::dr=HASH(0x981db68) rc2/3 @5 g0 ima8001
pid#27814) at /usr/local/lib/perl/5.10.0/DBI.pm line 638
!! warn: 0 CLEARED by call to connect method
-> connect for DBD::Pg::dr (DBI::dr=HASH(0x981db68)~0x981dbc8
'dbname=contacts' 'ron' **** HASH(0x97fa258)) thr#978b008
New 'DBI::db' (for DBD::Pg::db, parent=DBI::dr=HASH(0x981dbc8),
id=undef)
dbih_setup_handle(DBI::db=HASH(0x97fb1e8)=>DBI::db=HASH(0x97fb138),
DBD::Pg::db, 98599d8, Null!)
dbih_make_com(DBI::dr=HASH(0x981dbc8), 98165d0, DBD::Pg::db, 140, 0)
thr#978b008
dbih_setup_attrib(DBI::db=HASH(0x97fb138), Err,
DBI::dr=HASH(0x981dbc8)) SCALAR(0x9859be8) (already defined)
dbih_setup_attrib(DBI::db=HASH(0x97fb138), State,
DBI::dr=HASH(0x981dbc8)) SCALAR(0x9859c68) (already defined)
dbih_setup_attrib(DBI::db=HASH(0x97fb138), Errstr,
DBI::dr=HASH(0x981dbc8)) SCALAR(0x9859c28) (already defined)
dbih_setup_attrib(DBI::db=HASH(0x97fb138), TraceLevel,
DBI::dr=HASH(0x981dbc8)) 0 (already defined)
dbih_setup_attrib(DBI::db=HASH(0x97fb138), FetchHashKeyName,
DBI::dr=HASH(0x981dbc8)) 'NAME' (already defined)
dbih_setup_attrib(DBI::db=HASH(0x97fb138), HandleSetErr,
DBI::dr=HASH(0x981dbc8)) undef (not defined)
dbih_setup_attrib(DBI::db=HASH(0x97fb138), HandleError,
DBI::dr=HASH(0x981dbc8)) undef (not defined)
dbih_setup_attrib(DBI::db=HASH(0x97fb138), ReadOnly,
DBI::dr=HASH(0x981dbc8)) undef (not defined)
dbih_setup_attrib(DBI::db=HASH(0x97fb138), Profile,
DBI::dr=HASH(0x981dbc8)) undef (not defined)
Begin dbd_db_login
Login connection string: (dbname=contacts user='ron' password='seekrit')
PQconnectdb
Connection complete
PQstatus
PQsetNoticeProcessor
PQprotocolVersion
PQserverVersion
End dbd_db_login
>> FETCH DISPATCH (DBI::db=HASH(0x97fb138) rc2/1 @2 g0 ima404
pid#27814) at /usr/local/lib/perl/5.10.0/DBD/Pg.pm line 214 via
at /home/ron/scripts/Postgres/test.pg.pl line 18
-> FETCH for DBD::Pg::db (DBI::db=HASH(0x97fb138)~INNER
'pg_server_version') thr#978b008
Begin dbd_db_FETCH (key: pg_server_version)
End dbd_db_FETCH_attrib
<- FETCH= 80303 at /usr/local/lib/perl/5.10.0/DBD/Pg.pm line 214 via
at /home/ron/scripts/Postgres/test.pg.pl line 18
>> FETCH DISPATCH (DBI::db=HASH(0x97fb138) rc2/1 @2 g0 ima404
pid#27814) at /usr/local/lib/perl/5.10.0/DBD/Pg.pm line 215 via
at /home/ron/scripts/Postgres/test.pg.pl line 18
-> FETCH for DBD::Pg::db (DBI::db=HASH(0x97fb138)~INNER
'private_dbdpg') thr#978b008
Begin dbd_db_FETCH (key: private_dbdpg)
End dbd_db_FETCH_attrib
.. FETCH DBI::db=HASH(0x97fb138) 'private_dbdpg' = undef
<- FETCH= undef at /usr/local/lib/perl/5.10.0/DBD/Pg.pm line 215 via
at /home/ron/scripts/Postgres/test.pg.pl line 18
>> STORE DISPATCH (DBI::db=HASH(0x97fb138) rc2/1 @3 g0 ima41c
pid#27814) at /usr/local/lib/perl/5.10.0/DBD/Pg.pm line 215 via
at /home/ron/scripts/Postgres/test.pg.pl line 18
-> STORE for DBD::Pg::db (DBI::db=HASH(0x97fb138)~INNER
'private_dbdpg' HASH(0x97fb208)) thr#978b008
Begin dbd_db_STORE (key: private_dbdpg newval: 1 kl:-1212297216)
End dbd_db_STORE_attrib
STORE DBI::db=HASH(0x97fb138) 'private_dbdpg' => HASH(0x97fb208)
<- STORE= 1 at /usr/local/lib/perl/5.10.0/DBD/Pg.pm line 215 via
at /home/ron/scripts/Postgres/test.pg.pl line 18
<- connect= DBI::db=HASH(0x97fb1e8)
at /usr/local/lib/perl/5.10.0/DBI.pm line 638
>> STORE DISPATCH (DBI::db=HASH(0x97fb138) rc2/1 @3 g0 ima41c
pid#27814) at /usr/local/lib/perl/5.10.0/DBI.pm line 690
-> STORE for DBD::Pg::db (DBI::db=HASH(0x97fb138)~INNER 'PrintError'
1) thr#978b008
Begin dbd_db_STORE (key: PrintError newval: 1 kl:-1212094878)
End dbd_db_STORE_attrib
STORE DBI::db=HASH(0x97fb138) 'PrintError' => 1
<- STORE= 1 at /usr/local/lib/perl/5.10.0/DBI.pm line 690
>> STORE DISPATCH (DBI::db=HASH(0x97fb138) rc2/1 @3 g0 ima41c
pid#27814) at /usr/local/lib/perl/5.10.0/DBI.pm line 690
-> STORE for DBD::Pg::db (DBI::db=HASH(0x97fb138)~INNER 'AutoCommit'
1) thr#978b008
Begin dbd_db_STORE (key: AutoCommit newval: 1 kl:-1212094878)
Begin dbd_db_commit
Begin pg_db_rollback_commit (action: commit AutoCommit: 0 BegunWork: 0)
Begin PGTransactionStatusType
PQtransactionStatus
dbd_db_commit txn_status is 0
End pg_db_rollback_commit (result: 1)
Setting AutoCommit to 'on' forced a commit
End dbd_db_STORE_attrib
<- STORE= 1 at /usr/local/lib/perl/5.10.0/DBI.pm line 690
>> STORE DISPATCH (DBI::db=HASH(0x97fb138) rc2/1 @3 g0 ima41c
pid#27814) at /usr/local/lib/perl/5.10.0/DBI.pm line 693 via
at /home/ron/scripts/Postgres/test.pg.pl line 18
-> STORE for DBD::Pg::db (DBI::db=HASH(0x97fb138)~INNER 'Username'
'ron') thr#978b008
Begin dbd_db_STORE (key: Username newval: 1 kl:-1212094878)
End dbd_db_STORE_attrib
STORE DBI::db=HASH(0x97fb138) 'Username' => 'ron'
<- STORE= 1 at /usr/local/lib/perl/5.10.0/DBI.pm line 693 via
at /home/ron/scripts/Postgres/test.pg.pl line 18
>> FETCH DISPATCH (DBI::db=HASH(0x97fb138) rc2/1 @2 g0 ima404
pid#27814) at /usr/local/lib/perl/5.10.0/DBI.pm line 693
<> FETCH= 'ron' ('Username' from cache)
at /usr/local/lib/perl/5.10.0/DBI.pm line 693
>> connected DISPATCH (DBI::db=HASH(0x97fb1e8) rc1/1 @4 g0 ima5
pid#27814) at /usr/local/lib/perl/5.10.0/DBI.pm line 699
-> connected in DBD::_::db for DBD::Pg::db
(DBI::db=HASH(0x97fb1e8)~0x97fb138 'dbi:Pg:dbname=contacts' 'ron'
'seekrit') thr#978b008
<- connected= undef at /usr/local/lib/perl/5.10.0/DBI.pm line 699
<- connect= DBI::db=HASH(0x97fb1e8)
>> STORE DISPATCH (DBI::db=HASH(0x97fb138) rc2/1 @3 g0 ima41c
pid#27814) at /usr/local/lib/perl/5.10.0/DBI.pm line 708 via
at /home/ron/scripts/Postgres/test.pg.pl line 18
-> STORE for DBD::Pg::db (DBI::db=HASH(0x97fb138)~INNER
'dbi_connect_closure' CODE(0x992bda8)) thr#978b008
Begin dbd_db_STORE (key: dbi_connect_closure newval: 1 kl:-1212094878)
End dbd_db_STORE_attrib
STORE DBI::db=HASH(0x97fb138) 'dbi_connect_closure' =>
CODE(0x992bda8)
<- STORE= 1 at /usr/local/lib/perl/5.10.0/DBI.pm line 708 via
at /home/ron/scripts/Postgres/test.pg.pl line 18
dbh: DBI::db=HASH(0x97fb1e8).
>> DESTROY DISPATCH (DBI::db=HASH(0x97fb1e8) rc1/1 @1 g0
ima10004 pid#27814)
<> DESTROY(DBI::db=HASH(0x97fb1e8)) ignored for outer handle (inner
DBI::db=HASH(0x97fb138) has ref cnt 1)
>> DESTROY DISPATCH (DBI::db=HASH(0x97fb138) rc1/1 @1 g0
ima10004 pid#27814)
-> DESTROY for DBD::Pg::db (DBI::db=HASH(0x97fb138)~INNER)
thr#978b008
Begin dbd_db_disconnect
Begin dbd_db_rollback
Begin pg_db_rollback_commit (action: rollback AutoCommit: 1 BegunWork:
0)
End pg_db_rollback_commit (result: 0)
PQfinish
Disconnection complete
End dbd_db_disconnect
Begin dbd_db_destroy
End dbd_db_destroy
<- DESTROY= undef
DESTROY (dbih_clearcom) (dbh 0x97fb138, com 0x97ca270, imp
DBD::Pg::db):
FLAGS 0x100311: COMSET Warn PrintError PrintWarn AutoCommit
PARENT DBI::dr=HASH(0x981dbc8)
KIDS 0 (0 Active)
dbih_clearcom 0x97fb138 (com 0x97ca270, type 2) done.
-- DBI::END ($@: , $!: )
>> disconnect_all DISPATCH (DBI::dr=HASH(0x981db68) rc1/3 @1 g0
ima801 pid#27814) at /usr/local/lib/perl/5.10.0/DBI.pm line 716 via
at /home/ron/scripts/Postgres/test.pg.pl line 0
-> disconnect_all for DBD::Pg::dr
(DBI::dr=HASH(0x981db68)~0x981dbc8) thr#978b008
Begin dbd_discon_all
End dbd_discon_all
<- disconnect_all= '' at /usr/local/lib/perl/5.10.0/DBI.pm line 716
via at /home/ron/scripts/Postgres/test.pg.pl line 0
! >> DESTROY DISPATCH (DBI::dr=HASH(0x981dbc8) rc1/1 @1 g0
ima10004 pid#27814) during global destruction
! -> DESTROY in DBD::_::common for DBD::Pg::dr
(DBI::dr=HASH(0x981dbc8)~INNER) thr#978b008
! <- DESTROY= undef during global destruction
DESTROY (dbih_clearcom) (drh 0x981db68, com 0x98165d0, imp global
destruction):
FLAGS 0x100215: COMSET Active Warn PrintWarn AutoCommit
PARENT undef
KIDS 0 (0 Active)
dbih_clearcom 0x981db68 (com 0x98165d0, type 1) done.
! >> DESTROY DISPATCH (DBI::dr=HASH(0x981db68) rc1/1 @1 g0
ima10004 pid#27814) during global destruction
! <> DESTROY for DBI::dr=HASH(0x981db68) ignored (inner handle gone)
--
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html