Anone care to tell me why this part of the Tie::DBI code works when I do a
perl -d snippet but doesn't when I do it from a apache web server.  As best
I can tell teh variables are exactly the rather I use perl -d or the Apache
web server.  It just doesn't seem to be able to connect when I use Apache.

$dbh = $class->connect($dsn,$self->{user},$self->{password},
                               { AutoCommit=>$self->{AUTOCOMMIT},
                                 ChopBlanks=>1,
                                 PrintError=>0,
                                 Warn=>$self->{WARN},
                               }
                              );

Both ways, $class is Tie::DBI
$dsn is dbi:mysql:its
$self->{user}is helpman
$self->{password}  is secret01
AutoCommit=>$self->{AUTOCOMMIT is 1
Warn=>$self->{WARN} is 0

----- Original Message -----
From: "Michael A. Chase" <[EMAIL PROTECTED]>
To: "John Mulkerin" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, March 18, 2001 3:31 PM
Subject: Re: More dummy questions


> I don't use Tie::DBI or MySQL, so I can't comment on the semantics.
>
> You are missing a single quote character (') in the tie statement at
"user'
> =>".  Are you using 'use strict;' or '-w'?  Both help find syntax
problems.
> --
> Mac :})
> ** I normally forward private database questions to the DBI mail lists. **
> Give a hobbit a fish and he'll eat fish for a day.
> Give a hobbit a ring and he'll eat fish for an age.
> ----- Original Message -----
> From: "John Mulkerin" <[EMAIL PROTECTED]>
> To: "Michael A. Chase" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Sunday, March 18, 2001 10:26 AM
> Subject: Re: More dummy questions
>
>
> > I apoligize.  Here is the subroutine that is causing the problem.  If I
> add
> > a return statement prior to the "tie..." I get a return.  If I place the
> > return after the tie statement, it never gets to it.   There is nothing
in
> > the httpd-error.log and nothing in the mysql.log that I have enabled.
I'm
> > assuming it does not find the Tie::DBI.pm or I'd at least see an attempt
> in
> > the mysal.log.  I run it from perl -d snippet.pm and it workd fine.
> > sub authenticate {
> >         my ($self, $user, $passwd) = @_;
> >         my ($table, $userfield, $passwdfield, $permfield) =
> >                 split ':', $self->{TicketTable};
> >         my ($dbuser, $dbpass) = split ':', $self->{TicketDBAuth};
> >         tie my %DB,'Tie::DBI',{db => 'mysql:its', 'table' =>
> 'passwd','key'
> > => 'username',user' => $dbuser
> > , 'password' => $dbpass,};
> >         my $saved_passwd = $DB{$user}->{$passwdfield};
> >         return (undef, "Your username and/or password is invalid", '')
> >                 unless $saved_passwd eq crypt($passwd, $saved_passwd);
> > > ----- Original Message -----
> > > From: "John Mulkerin" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Sunday, March 18, 2001 9:25 AM
> > > Subject: More dummy questions
> > >
> > >
> > > > Seems like my program isn't finding the Tie:DBI routine although I
> have
> > > "use
> > > > Tie::DBI; in the declaration at the start of the program.    How can
I
> > > > figure out what path it is using?
>
>

Reply via email to