 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
peperoni
Joined: 19 May 2006 Posts: 1
|
Posted: Fri May 19, 2006 10:38 pm Post subject: I can't login! |
|
|
I'm tryin' to follow an example of how to use de Auth class but always i got the same error...
Here's the example
| Code: | <?php
/**
* Prueba de PEAR + Auth
*
* Marconi 19/05/2006
* @version $Id$
* @copyright 2006
*/
require_once 'lib\PEAR.php';
require_once 'lib\DB.php';
require_once 'lib\DB\mysql.php';
require_once 'lib\Auth.php';
$parametros = array(
"dns" => "mysql://test:test@localhost/test",
"table" => "usuario",
"usernamecol" => "login",
"passwordcol" => "passwd"
);
$a = new Auth("DB", $parametros);
$a->start();
if ($a->getAuth()) {
if ($_GET[act]==logout) {
$a->logout;
echo "Has salido de la sesion";
echo "<a href=\"$PHP_SELF?act=login\">Login</a><br />\n";
}
else {
printf ("Welcome User <b>%s</b>",$a->getUsername());
echo "<a href=\"$PHP_SELF?act=logout\">Logout</a><br />\n";
}
}
else {
echo "No esta autentificado<br>";
echo "Intente con pp/pp o karen/karen";
}
?> |
All the database parameters are correct, but im still gettin Wrong login data
S.O. can see the error? |
|
| Back to top |
|
 |
Kaleun
Joined: 10 Dec 2006 Posts: 1
|
Posted: Sun Dec 10, 2006 8:37 pm Post subject: |
|
|
hello,
you need to disable md5 encryption.
'dsn' => "mysql://root:password@localhost/database",
"table" => "auth",
"usernamecol" => "username",
"passwordcol" => "password",
"cryptType" => "" <------------------- !!!! you must have this
); |
|
| 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
|
|