PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
I can't login!

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Authentication
View previous topic :: View next topic  
Author Message
peperoni



Joined: 19 May 2006
Posts: 1

PostPosted: Fri May 19, 2006 10:38 pm    Post subject: I can't login! Reply with quote

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
View user's profile Send private message
Kaleun



Joined: 10 Dec 2006
Posts: 1

PostPosted: Sun Dec 10, 2006 8:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Authentication All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software