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