PEAR::Auth ???
| From: | Ferhat BINGOL | Date: | Wed, 25 Dec 2002 15:14:09 +0000 |
| Subject: | PEAR::Auth ??? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-3072@lists.php.net to get a copy of this message | ||
Hi all,
My problem is about PEAR::Auth system. I am so new that PEAR idea and I do
not know what I am doing wrong....
I am using WindowsXP + Apache 1.3.x + MYSQL 3.23.39 + PHP 4.2.3
Simply till now I did these;
1) I did not setup PEAR cause I am using a version a PEAR build in PHP
version, right?
2) I downloaded http://pear.php.net/package-info.php?pacid=2
and put it into
my includes directory under directory of AUTH
3) Than I open the usage of this directory from php.ini
4) Than I use the code below
require_once "Auth/Auth.php";
function loginFunction()
{
/**
* Change the HTML output so that it fits to your
* application.
*/
echo "<form method=\"post\" action=\"" .
$_SERVER['PHP_SELF'] . "\">";
echo "<input type=\"text\" name=\"username\">";
echo "<input type=\"password\" name=\"password\">";
echo "<input type=\"submit\">";
echo "</form>";
}
$dsn = "mysql://user:password@localhost/database";
$a = new Auth("DB", $dsn, "loginFunction");
$a->start();
if ($a->getAuth()) {
print "You are in!";
}
That is all till I did now and here is what happens when I run it
1) in first screen I got the usr name and password boxes and than I got this
message
Fatal error: Undefined class name 'db' in
H:\php\includes\Auth\Container\DB.php on line 133
Does anyone know what the problem is?
Thanks,
FERHAT