I changed the $dbh line to
my $dbh =
DBI->connect("dbi:Pg:dbname=tracker;host=bullwinkle.eng.auburn.edu;port=5432;","","");
and added a dbh->trace(4) and got the following output. It appears to fail around the
connect with DBI.pm.
DBI 1.14-nothread dispatch trace level set to 4
Note: perl is running without the recommended perl -w option
-> DBI->connect(dbi:Pg:dbname=tracker;host=bullwinkle.eng.auburn.edu;port=5432;, ,
****)
-> DBI->install_driver(Pg) for perl=5.006001 pid=27646 ruid=200 euid=200
install_driver: DBD::Pg loaded (version 0.98)
New DBI::dr (for DBD::Pg::dr, parent=, id=)
dbih_setup_handle(DBI::dr=HASH(0x2002c8)=>DBI::dr=HASH(0x248214), DBD::Pg::dr, 0,
Null!)
dbih_make_com(Null!, DBD::Pg::dr, 84)
<- install_driver= DBI::dr=HASH(0x2002c8)
-> connect for DBD::Pg::dr (DBI::dr=HASH(0x2002c8)~0x248214
'dbname=tracker;host=bullwinkle.eng.auburn.edu;port=5432;' '' **** HASH(0x15807c))
New DBI::db (for DBD::Pg::db, parent=DBI::dr=HASH(0x248214), id=)
dbih_setup_handle(DBI::db=HASH(0x2481c0)=>DBI::db=HASH(0x248208), DBD::Pg::db,
20001c, Null!)
dbih_make_com(DBI::dr=HASH(0x248214), DBD::Pg::db, 96)
pg_db_login
pg_db_login: conn_str = >dbname=tracker host=bullwinkle.eng.auburn.edu port=5432 <
ERROR EVENT 1 '' on DBI::db=HASH(0x2481c0)
error 1 recorded:
!! ERROR: 1 ''
<- connect= undef at DBI.pm line 408.
-> errstr in DBD::_::common for DBD::Pg::dr (DBI::dr=HASH(0x2002c8)~0x248214)
<- errstr= 1 at DBI.pm line 409.
DBI->connect(dbname=tracker;host=bullwinkle.eng.auburn.edu;port=5432;) failed: 1 at
./tracker2.pl line 21
DBI->connect(dbname=tracker;host=bullwinkle.eng.auburn.edu;port=5432;) failed: 1
<> DESTROY ignored for outer handle DBI::db=HASH(0x2481c0) (inner
DBI::db=HASH(0x248208))
-> DESTROY for DBD::Pg::db (DBI::db=HASH(0x248208)~INNER)
Database handle DBI::db=HASH(0x248208) DESTROY ignored - never set up at ./tracker2.pl
line 22.
<- DESTROY= undef at tracker2.pl line 22.
dbih_clearcom 0x2481c0 (com 0x23d440, type 2) done.
Can't call method "prepare" on an undefined value at ./tracker2.pl line 22.
-- DBI::END
-> disconnect_all for DBD::Pg::dr (DBI::dr=HASH(0x2002c8)~0x248214)
dbd_discon_all
<- disconnect_all= '' at DBI.pm line 450.
-> DESTROY in DBD::_::common for DBD::Pg::dr (DBI::dr=HASH(0x248214)~INNER)
<- DESTROY= undef during global destruction.
dbih_clearcom 0x2002c8 (com 0x23d170, type 1) done.
<> DESTROY for DBI::dr=HASH(0x2002c8) ignored (inner handle gone)
On Mon, 7 May 2001, Sterin, Ilya wrote:
> Use trace() to find out the exact reason for connect failing.
>
> Ilya Sterin
>
> -----Original Message-----
> From: Stephen M. Ford
> To: [EMAIL PROTECTED]
> Sent: 05/07/2001 9:58 AM
> Subject: dbd::Pg again
>
> Can someone tell me what is wrong with this statement?
>
> $dbh = DBI->connect("dbi:Pg:tracker;host=bullwinkle;port=5432;","","");
>
> DBI->connect(tracker;host=131.204.12.48;port=5432;) failed: 1 at
> ./tracker2.pl line 16
>
> Thanks,
> Stephen
>
>