Auth getStatus always returns -3
| From: | " | Date: | Sun, 04 Jul 2004 18:01:06 +0000 |
| Subject: | Auth getStatus always returns -3 | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-13483@lists.php.net to get a copy of this message | ||
Greetings All:
I have been trying to set up Auth. I have created some test scripts but I can't seem to get it
working.
getStatus() always returns a status of "-3".
Here is my environment.
Linux 2.4.22
PHP Version 5.0RC3
Apache Version: 2.0.49 running with SSL
DB: Oracle 9i
I was successfully able to insert a user into the database with AddUser() and I see the password as
a MD5 hash.
To keep it simple and to eliminate the chance that I was mis-typing the user/pass combination, the
user name is a single character "x" and the password is a single character "y"
I would be grateful if anybody can enlighten me as to where my problem is. Here is my test script.
It is basically the example from the user docs, with some debugging code thrown in.
<?php
require_once ("Auth/Auth.php");
require_once("db_setup.inc");
function login_function()
{
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>";
}
$params = array(
"dsn" => "oci8://paul:password@ora9i.localdomain",
"table" => "users",
"usernamecol" => "usr_id",
"passwordcol" => "pass_wd"
);
$a = new Auth("DB", $params, "login_function");
$a->start();
// ***** begin debugging ********
$stat = $a->getStatus();
var_dump($stat); echo "is status<br>";
$ego = $a->getAuth();
var_dump($ego); echo "is returned by getAuth<br>";
echo"<br><br> A var_dump of the Auth object is <br>";
var_dump($a);
// ******* end debugging *******
if ($a->getAuth())
{
echo "You have been authenticated successfully.";
}
?>
Here is the output (minus the login form and vardump of $a):
int(-3) is status
bool(false) is returned by getAuth
If necessary, I can include the var_dump of $a, but it is very long.
Thanks for helping.
_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!