Re: Auth_HTTP, it's not authenticating...
| From: | Ian Leckie | Date: | Tue, 29 Jul 2003 03:14:35 +0000 |
| Subject: | Re: Auth_HTTP, it's not authenticating... | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-6883@lists.php.net to get a copy of this message | ||
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://....";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. -- Ian Leckie Interactive Development Coordinator Integer > Midwest$options = array('table' => 'scl_users','usernamecol' => 'uid', 'passwordcol' => 'pword', // 'cryptType' => 'md5','dns' => $dsn,);