Re: newbie - Auth
| From: | mel list_php | Date: | Thu, 04 Aug 2005 13:03:44 +0000 |
| Subject: | Re: newbie - Auth | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20266@lists.php.net to get a copy of this message | ||
The modified code on your template:
$auth = new Auth("DB", $params, "loginFunction" );
$auth->setExpire(7200, 'false');
$auth->setIdle(1200, 'false');
print_r($auth);
$auth->start();
Before calling the method:
DB OK
Object ( [expire] => 7200 [expired] => [idle] => 1200 [idled] => [storage] => [loginFunction] => loginFunction [showLogin] => 1 [allowLogin] => 1 [status] => [username] => [password] => [loginCallback] => [loginFailedCallback] => [logoutCallback] => [_sessionName] => _authsession [version] => @version@ [advancedsecurity] => [_postUsername] => username [_postPassword] => password [session] => [server] and so on....
after calling it nothing (except "DB OK" which is my DB connection test).
I think that [storage] should be instantiated as well?shouldn't it be DB?
So Auth is well installed and running, I downloaded it yesterday and didn't modify it.
The database is ok as well, I can run queries on it:
$db = DB::connect($dsn);
$sql = "select * from test";
$res = $db->query($sql);
while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$id = $row->targetId;
$text = $row->text_name;
echo " id: $id et $text<br>";
}
works fine.
Sorry if a bit fastidious, but I try to eliminate all the possible error sources...
Thank you very much!
melanie
What do you have if you do a 'print_r($a) before and after the start method ? -- --------------------- Sylvain Gourvil Développeur PHP5, PEAR, SMARTY, POSTGRESQL Antiquités en France -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php_________________________________________________________________ Be the first to hear what's new at MSN - sign up to our free newsletters! http://www.msn.co.uk/newsletters