Re: MD5 & Auth class

From: Date: Wed, 01 Sep 2004 00:51:45 +0000
Subject: Re: MD5 & Auth class
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-14358@lists.php.net to get a copy of this message
Dear, I have checked my DB,Inserted my data,password as MD5. I think that i have problem with following line: $parameterforauth=array("dsn"=>"mysql://jiq:mohsen@localhost/mem", "table"=>"usernames", "usernamecol"=>"user", "passwordcol"=>"pass"); Please guide me..... ////////////////////////Mohsen --- Chris Ilias <mist@uep.at> wrote: > Pahlevanzadeh Mohsen wrote: > > > I have tested your code.But i didnt see okkkkkkkk. > > Therefore your code is false. > > My new code was: > > <? > > set_include_path(get_include_path().'/'.'auth'); > > include_once('Auth/Auth.php'); > > function x(){echo "xxxxxxxxxxxxxxxxxxx";} > > mysql_pconnect('localhost',"root",''); > > first of all u should set a mysql user with an > password due to security > reasons, many pear classes dont allow a user 'root' > with no password!! > > > mysql_select_db('mem'); > > $us = "jiq"; > > $pa = "mohsen"; > > $sql = "INSERT INTO usernames(user,pass) > VALUES('$us',MD5('$pa'))"; > > mysql_query($sql); > > did u check the table usernames if the user was > properly inserted?? > are there any PHP errors displayed? > > > > $parameterforauth=array("dsn"=>"mysql://jiq:mohsen@1.1.1.1/mem", > is this your mysql user in the dsn???? above u > connect with user root to > the server!! > > > "table"=>"usernames", > > "usernamecol"=>"user", > > "passwordcol"=>"pass"); > ad these lines to the parametersforauth array > 'cryptType'=>"md5", > 'db_fields'=>'*', > > //last stores all fields of table usernames in > session > $_SESSION['_authsession']['data'] > > > > $ptr_auth_C=new auth("DB",$parameterforauth,"x"); > > $ptr_auth_C->start(); > > if ($ptr_auth_C->getAuth()) > > echo "okkkkkkkkkkkkkkk"; > > //echo $pass." ".$user; > > ?> > > Please guide me...... > > > -- > ---//---//---//---//---//---//---//---//---//---// > Christoph Ilias email: mist@uep.at > ------------------------------------------------- > "Die meisten Probleme sitzen vor dem Bildschirm" > ===== ---------DIGITAL SIGNATURE------------------- ///Mohsen Pahlevanzadeh//////// Network administrator & programmer My home phone is: +98213810146 My email address is m_pahlevanzadeh at yahoo dot com My website is: http://webnegar.net ---------------------------------------------------------------- _______________________________ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush

« previous php.pear.general (#14358) next »