Re: Auth_HTTP, it's not authenticating...

From: Date: Tue, 29 Jul 2003 11:40:04 +0000
Subject: Re: Auth_HTTP, it's not authenticating...
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-6891@lists.php.net to get a copy of this message
Did you encrypt your passwords with MD5 in the database? Auth actually checks for the encrypted password, rather than the plaintext one. -- Alexander ________________________________ Alexander Czernay IT-Consulting & Media Development fon +49-40-41096742 fax +49-40-41096743 icq 4773650 alexander@czernay.com www.czernay.com _________________________________ Stan Lemon wrote:
I found those and unfortunatley still had the same problems. I also upgraded Auth tonight. (By the way the dns/dsn error is in the PEAR documentation) I'm clueless. Is there any way to get good errors from what's going on with the DB in this? - Stan Ian Leckie wrote:
On Monday, July 28, 2003, at 02:03 PM, Stan Lemon wrote:
I am trying to use Auth_HTTP to authenticate a user before accessing content. I have a table in the db called scl_users with uid (varchar(32)) and password (varchar(32)). I use the following code: <?php //print md5("password"); //require_once "DB.php"; require_once "Auth_HTTP/Auth_HTTP.php"; $dsn = "mysql://....";
$options = array('table'         => 'scl_users',
                 'usernamecol'   => 'uid',
                 'passwordcol'   => 'pword',
//                 'cryptType'      =>    'md5',
                 'dns'           => $dsn,);
You have 2 errors in this code. 1: in the intro you claim that the password field is called 'password', but then you set $options['passwordcol'] to 'pword'. 2. you are setting $options['dns'] rather than $options['dsn']. If those errors are in your actual code, they would account for your problems.
-- _________________________________ Alexander Czernay IT-Consulting & Media Development fon +49-40-41096742 fax +49-40-41096743 icq 4773650 alexander@czernay.com www.czernay.com _________________________________

« previous php.pear.general (#6891) next »