You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Christian Heiss <Ch...@heiss-net.de> on 2001/04/22 16:31:17 UTC

Apache::AuthDBI

Hi,

I'm using Apache::AuthDBI to verifying the users on my web site.



I can connect to the the protected site, but there is a output in the error log:

----------------------------------------------------------------------------------------------------------------------------------------
>Use of uninitialized value at /usr/lib/perl5/site_perl/5.005/Apache/AuthDBI.pm line 450
>Use of uninitialized value at /usr/lib/perl5/site_perl/5.005/Apache/AuthDBI.pm line 480
>Use of uninitialized value at /usr/lib/perl5/site_perl/5.005/Apache/AuthDBI.pm line 481
----------------------------------------------------------------------------------------------------------------------------------------

To crypt the the passwords I'm using something like this:
----------------------------------------------------------------------------------------------------------------------------------------
>my $userid = $query->param('userid');
> my $pass = $query->param('pass');
> my $groupid = $query->param('groupid');
>my $fullname = $query->param('fullname');
 
 $pass = crypt("$pass", "$userid");
----------------------------------------------------------------------------------------------------------------------------------------

then I put it in the database with:
----------------------------------------------------------------------------------------------------------------------------------------
>my $sql = "INSERT INTO <table name> VALUES($userid, $groupid, $pass, ...);
of course, before I'm using the quote funktion ($dbh->quote($userid)...)...
----------------------------------------------------------------------------------------------------------------------------------------

and my .htacces is:
----------------------------------------------------------------------------------------------------------------------------------------
>PerlModule Apache::AuthDBI
>AuthName "something else"
>AuthType Basic
>PerlAuthenHandler Apache::AuthDBI::authen
>PerlAuthzHandler Apache::AuthDBI::authz
>PerlSetVar Auth_DBI_encrypted on
>PerlSetVar Auth_DBI_data_source dbi:mysql:<database>
>PerlSetVar Auth_DBI_username <user name>
>PerlSetVar Auth_DBI_password <password>
>PerlSetVar Auth_DBI_pwd_table <table name>
>PerlSetVar Auth_DBI_uid_field <userid field>
>PerlSetVar Auth_DBI_grp_field <groupid field>
>PerlSetVar Auth_DBI_pwd_field <password field>

>require valid-user

>allow from all
----------------------------------------------------------------------------------------------------------------------------------------



Anybody knows how to stop this error output?

Thanks a lot

Christian Heiß

Re: Apache::AuthDBI

Posted by Edmund Mergl <e....@bawue.de>.
Christian Heiss wrote:

>>and my .htacces is:
>>---------------------------------------------------------------------------------------------------------------
>>>PerlModule Apache::AuthDBI
>>>AuthName "something else"
...


how does your startup.pl look like ?
The configuration 'PerlModule Apache::AuthDBI'
is not supposed to be in .htaccess. Also it
would be helpful to know the version of ApacheDBI.


Edmund

-- 
http://www.edmund-mergl.de
fon: +49 700 edemergl

Re: Apache::AuthDBI

Posted by will trillich <wi...@serensoft.com>.
On Tue, Jun 19, 2001 at 10:38:01AM -0700, Alan E. Derhaag wrote:
> "Christian Heiss" <Ch...@heiss-net.de> writes:
> 
> > Hi,
> > 
> > I'm using Apache::AuthDBI to verifying the users on my web site.

> > then I put it in the database with:
> > ----------------------------------------------------------------------------------------------------------------------------------------
> > >my $sql = "INSERT INTO <table name> VALUES($userid, $groupid, $pass, ...);
> > of course, before I'm using the quote funktion ($dbh->quote($userid)...)...

maybe do this instead:

	@vars = ($alpha,$bravo,$charlie,$delta);
	my $sql = "insert into sometable values(" . (join '.',('?') x @vars) . ")";
	$sth = $dbh->prepare($sql);
	$sth->execute(@vars);
	$sth->finish();

just a suggestion...

-- 
I figure: if a man's gonna gamble, may as well do it
without plowing.   -- Bama Dillert, "Some Came Running"

will@serensoft.com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

Re: Apache::AuthDBI

Posted by Douglas Leonard <dl...@dleonard.net>.
Standard SQL allows for inserts without specifying field names.
Personally, I think that it is more readable to specify the field names
but it is quite common to not bother doing so.

-- 
<Douglas Leonard>
<dl...@dleonard.net>

On 19 Jun 2001, Alan E. Derhaag wrote:

> "Christian Heiss" <Ch...@heiss-net.de> writes:
>
> > [1  <text/plain; iso-8859-1 (quoted-printable)>]
> > Hi,
> >
> > I'm using Apache::AuthDBI to verifying the users on my web site.
> >
> >
> >
> > I can connect to the the protected site, but there is a output in the error log:
> >
> > ----------------------------------------------------------------------------------------------------------------------------------------
> > >Use of uninitialized value at /usr/lib/perl5/site_perl/5.005/Apache/AuthDBI.pm line 450
> > >Use of uninitialized value at /usr/lib/perl5/site_perl/5.005/Apache/AuthDBI.pm line 480
> > >Use of uninitialized value at /usr/lib/perl5/site_perl/5.005/Apache/AuthDBI.pm line 481
>
> [...]
>
> > then I put it in the database with:
> > ----------------------------------------------------------------------------------------------------------------------------------------
> > >my $sql = "INSERT INTO <table name> VALUES($userid, $groupid, $pass, ...);
> > of course, before I'm using the quote funktion ($dbh->quote($userid)...)...
>
> What database manager allows SQL without supplying the fields the
> values go into?
>


Re: Apache::AuthDBI

Posted by "Alan E. Derhaag" <ad...@n2h2.com>.
"Christian Heiss" <Ch...@heiss-net.de> writes:

> [1  <text/plain; iso-8859-1 (quoted-printable)>]
> Hi,
> 
> I'm using Apache::AuthDBI to verifying the users on my web site.
> 
> 
> 
> I can connect to the the protected site, but there is a output in the error log:
> 
> ----------------------------------------------------------------------------------------------------------------------------------------
> >Use of uninitialized value at /usr/lib/perl5/site_perl/5.005/Apache/AuthDBI.pm line 450
> >Use of uninitialized value at /usr/lib/perl5/site_perl/5.005/Apache/AuthDBI.pm line 480
> >Use of uninitialized value at /usr/lib/perl5/site_perl/5.005/Apache/AuthDBI.pm line 481

[...]

> then I put it in the database with:
> ----------------------------------------------------------------------------------------------------------------------------------------
> >my $sql = "INSERT INTO <table name> VALUES($userid, $groupid, $pass, ...);
> of course, before I'm using the quote funktion ($dbh->quote($userid)...)...

What database manager allows SQL without supplying the fields the
values go into?