PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Authentication » Auth » Bug #2270

Package Auth can't read my RDBMS.

Details

Submitted2004-09-01 23:44 UTC
Fromm_pahlevanzadeh at yahoo dot com
Assignedyavo
StatusClosed
PackageAuth
PHP Version4.3.3
OSFedora Core 1
Roadmaps(Not assigned)

Comments

[2004-09-01 23:44 UTC] m_pahlevanzadeh at yahoo dot com

Description:
------------
I have mem as bank,usernames as its table,user & pass as its fields.
mysqld is up.
I have inserted mohsen as username & hash of mohsen as pass to my table.
I have checked,they inserted correct.Also they are in my table.
But when i enter mohsen & mohsen as username & password & i submitted it,It doesn't show "Successfuly loggined!!!!!!!"
Even when i deleted Login function from Auth constructure,It didn't work.

Reproduce code:
---------------
<?
include_once('Auth/Auth.php');
function Login()
{
echo "<form method=\"post\" action=\"".$_SERVER['PHP_SELF']. "\"\">";
echo "<input type=\"text\" name=\"u\"> <br />";
echo "<input type=\"password\" name=\"p\"> <br />";
echo "<input type=\"submit\">";
echo "</form>";
}
$username=$_POST['u'];
$password=$_POST['p'];
echo md5('mohsen');
$parameterforauth=array("dsn"=>"mysql://$username:$password@localhost/mem",
"table"=>"usernames",
"usernamecol"=>"user",
"passwordcol"=>"pass");
$ptr_auth_C=new Auth("DB",$parameterforauth,'Login');
$ptr_auth_C->start();
if ($ptr_auth_C->getAuth())
echo "Successfuly loggined!!!!!!!";
?>