Re: PEAR::Auth 1.0.2 and PEAR::DB 1.3 don't appear to work together
| From: | oododa at sbcglobal dot net | Date: | Mon, 30 Sep 2002 06:39:24 +0000 |
| Subject: | Re: PEAR::Auth 1.0.2 and PEAR::DB 1.3 don't appear to work together | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-2412@lists.php.net to get a copy of this message | ||
I don't have a web server connected to the web, so I have to include the
contents of the file. I've trimmed it down quite a bit, and this still
doesn't work, with the same symptom: no error, just a seeming halt. I have
also tried using PEAR-0.9 instead, same result.
The code runs to the statement 'echo "[2]";' ... the [3] statement never
shows. I edited AUTH.php and included some similar echo statements to try to
determine where the freeze was; after finding the line I specified in my
previous post, I deleted the entire directory, unzipped all the files in the
same place, same error.
(I'm willing to try to fix the code if it is indeed broken and you have no
time to; I just wasn't sure there was any error and wanted to find out.)
<?
echo "[1]";
define ("BASE_DIR", 'e:\\tabkeeper\\public_html\\');
require_once("PEAR-0.91-dev/PEAR.php");
require_once("DB-1.3/DB.php");
require_once("Auth/Auth.php");
function loginFunction() {
echo "<form method=\"post\" action=\"" .
$_SERVER['PHP_SELF'] .
"?login=1\">";
echo "<input type=\"text\" name=\"username\">";
echo "<input type=\"password\" name=\"password\">";
echo "<input type=\"submit\">";
echo "</form>";
}
$dsn = "mysql://user:user@localhost/tabkeeper";
echo "[2]";
$_USER = new Auth("DB", $dsn, "loginFunction", true);
echo "[3]";
$_USER->start();
echo "[4]";
if ($_USER->getAuth()) {
echo "One can only see this if he is logged in!";
} else {
echo "<a href=\"test.php?login=1\">Click here to log in</a>\n";
}
?>
--
O.