Re: Re: Auth_HTTP, it's not authenticating...
| From: | Eric \"e-dawg\" Johnston | Date: | Mon, 28 Jul 2003 20:31:10 +0000 |
| Subject: | Re: Re: Auth_HTTP, it's not authenticating... | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-6875@lists.php.net to get a copy of this message | ||
Prompting on each page hit, but it authenticates for that specific page?
On Mon, 2003-07-28 at 13:28, Stan Lemon wrote:
> Ok, I know I am connected now. :-) I was able to add a user.
>
> Still not autheticating though, it keeps prompting, and prompting.
>
> Stan Lemon wrote:
>
> > Ok, I tried using addUser() and it didn't work either.
> >
> > So I am guessing that I did something wrong in connected. Can anyone
> > help me figure out why I am not connected? Thanks.
> >
> > - Stan
> >
> > 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,);
> >>
> >>
> >> $auth = new Auth_HTTP("DB",$options,true);
> >>
> >> $auth->start();
> >>
> >>
> >> if ($auth->getAuth()) {
> >> print "Hello World";
> >> }
> >>
> >> ?>
> >>
> >> It prompts me and prompt me, and prompts me more... Am I doing
> >> something wrong? I printed my password out using md5 and dumped that
> >> in the db with my username.
> >>
> >> I have no idea how to retriece errors or anything.
> >>
> >> If anyone could help me it'd be greatly appreciated. Thanks.
> >>
> >> - Stan
> >>
> >
>