costas has asked for the wisdom of the Perl Monks concerning the following question:
When I attempt to run my DBD test script (I should also add that I have had this run succesfully many times on different systems) it falls over on the 'connect' line. This is my codeDriver: ExampleP Data Source is dbi:ExampleP:dir=. Driver: Proxy Driver: mysql
Please note that I am %100 sure of my database detail (ie username pass etc). Even if the database details were wrong, the die command should at least give me the error.#!/usr/bin/perl use strict; use DBI; BEGIN { $|=1; print "Content-type: text/html\n\n"; use CGI::Carp('fatalsToBrowser'); } my $dbh = DBI->connect('DBI:mysql:wwf', 'username', 'pass') || die "c +ant open db"; my $sql = "SELECT * FROM url WHERE rec_id = 1399863634"; my $sth = $dbh->prepare( $sql ); $sth->execute(); my $goodrow = $sth->fetchrow_hashref; $dbh->disconnect(); print "$goodrow->{'url'}";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: DBD::mysql
by ralphie (Friar) on Oct 17, 2001 at 17:05 UTC | |
Re: DBD::mysql
by MZSanford (Curate) on Oct 17, 2001 at 14:53 UTC | |
by costas (Scribe) on Oct 17, 2001 at 15:03 UTC | |
by MZSanford (Curate) on Oct 17, 2001 at 15:14 UTC | |
by costas (Scribe) on Oct 18, 2001 at 13:54 UTC | |
by kostis (Initiate) on Oct 17, 2001 at 16:37 UTC | |
by MZSanford (Curate) on Oct 17, 2001 at 16:50 UTC | |
Re: DBD::mysql
by kostis (Initiate) on Oct 17, 2001 at 16:51 UTC | |
Re: DBD::mysql
by busunsl (Vicar) on Oct 17, 2001 at 14:53 UTC | |
Re: DBD::mysql
by barndoor (Pilgrim) on Oct 17, 2001 at 19:42 UTC | |
by costas (Scribe) on Oct 17, 2001 at 20:12 UTC |