Re: Auth_HTTP, it's not authenticating...
| From: | Stan Lemon | Date: | Tue, 29 Jul 2003 04:04:27 +0000 |
| Subject: | Re: Auth_HTTP, it's not authenticating... | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-6884@lists.php.net to get a copy of this message | ||
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://....";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.$options = array('table' => 'scl_users', 'usernamecol' => 'uid', 'passwordcol' => 'pword', // 'cryptType' => 'md5', 'dns' => $dsn,);