Auth Package Fails
| From: | Sonny2 at gmx dot de | Date: | Tue, 05 Aug 2003 17:47:08 +0000 |
| Subject: | Auth Package Fails | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-7026@lists.php.net to get a copy of this message | ||
Hello,
I try to use PEAR::Auth but it fails me all the time. Authentification is
working so I get in, but if click on a page or try to logout or
reload the page, then comes following error:
Fatal error: Call to a member function on a non-object in
/usr/local/lib/php/Auth/Auth.php on line 239
I instance Auth following:
/**
* Instance of PEAR::Auth
*/
require 'Auth/Auth.php';
require 'functions/loginfunc.php';
preload.php
$params = array(
'dsn' => $my->SQLdsn(),
'table' => $authSet['table'],
'usernamecol' => $authSet['usernamecol'],
'passwordcol' => $authSet['passwordcol'] );
$auth =& new Auth("DB", $params, loginForm );
$auth->setSessionName($authSet['sessionname']);
$auth->setExpire($authSet['expireLogin'], 120);
Login Page:
require 'preload.php';
$auth->start();
if ( $auth->getAuth() ) {
header("Location: main.php");
}
Main Page:
require 'preload.php';
$auth->start();
$page->title("Main Screen TuxCafe Manager");
$page->body("<br><br><div align=\"center\"><h3><a
href=\"logout.php?user=".$auth->username."\">Logout $auth->username
</a></h3></div>");
$page->display();
I use:
Auth 1.2.2 stable
with php: 4.3.1
May someone can help me? Or could this be an bug in PEAR?
Thanks in forward.
Peter
--
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--------------------------------------------------
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualitätssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post