 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
Lorenzo
Joined: 19 Dec 2008 Posts: 1
|
Posted: Fri Dec 19, 2008 1:01 pm Post subject: AUTH : Bug with Auth\Container\MDB2.php |
|
|
hello,
i try to use AUTH but i have a BUG ...
situation :
when i use my test code with "MDB2" as first parameter for the AUTH contructor , i have errors, but if i use instead DB or MDB all works fine.
i use PHP 5.2.1 with the stable AUTH 1.6.1 (the last) and PEAR 1.7.2 (the last)
i try with MDB2 2.4.1 and also the beta 2.5.0b1.
explanation and answer :
after spent times with the nose in the file Auth\Container\MDB2.php i have found the bug at the line (it's the same bug for the others lines) : | Code: | | $res[$this->options['passwordcol']] = trim($res[$this->options['passwordcol']], "\r\n"); |
the variable $res contains (in my case) :
| Quote: | ['clpseudo'] => lorenzo
['clpass'] => 456z045453f38676c40deb9864f811d |
and the value from $this->options['passwordcol'] :
the answer : the variable loose is 'case' and turn from clPass to clpass
the base of this problem is in the MDB2 package but when i have see all the lines of code in MDB2 and the lack of explanation on the dependancy i lost my determining to resolve it ...
i moan :
it's the first time in my 10 years old in programming that i want to use code i'm not the author and the problems (this bug and the lack of a full documentation) fall on me
i wanted to use AUTH and MDB2 for creating my new forum but now i'm doubtful ...
is this issue normal ?
what can i do to evade futur issue ?
the code :
| Code: |
require_once('AUTH.php');
$options = array(
'dsn' => "mysql://root:@localhost/forum",
'postUsername' => 'username',
'postPassword' => 'password',
'table' => 'clients',
'usernamecol' => 'clPseudo',
'passwordcol' => 'clPass',
'cryptType' => 'md5',
'db_fields' => array('clDateNee','clDate','clNiveau','clColor','clAvatar'),
);
$a = new Auth("MDB2", $options, "loginFunction");
$a->start();
if (!$a->checkAuth()) {
print("Authentification réussi !!");
}else{
print("Authentification refusé");
} |
the errors :
| Quote: | Notice: Undefined index: clPass in C:\Program Files\_travail\xampp\php\PEAR\Auth\Container\MDB2.php on line 342
Notice: Undefined index: clPseudo in C:\Program Files\_travail\xampp\php\PEAR\Auth\Container\MDB2.php on line 371 |
bye  |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1230
|
Posted: Fri Dec 19, 2008 4:17 pm Post subject: |
|
|
I'm short in time today and haven't read every word of your posting, but I guess that you want to take a look at the portability options of the MDB2 package.
If this doesn't help or this isn't the problem, just post again. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|