Auth - big problem :-(

From: Date: Fri, 08 Mar 2002 16:12:32 +0000
Subject: Auth - big problem :-(
Groups: php.pear.webmaster 
Request: Send a blank email to pear-webmaster+get-68@lists.php.net to get a copy of this message
Do anybody have any problems with Auth class? I get very strange behaviour from Auth class. Look at the following. ----------- MyAuth.php --------- <?php require_once "Auth/Auth.php"; class MyAuth extends Auth { function MyAuth($show_login = false) { $options = array ( "dsn" => MY_DSN, "table" => "myAuth", "usernamecol" => "Username", "passwordcol" => "Passwd", ); $this->Auth("DB", $options, "drawLogin", $show_login); } } ?> ---------- Login.php: --------------- <?php require_once "MyAuth.php"; $myAuth = new MyAuth(true); $myAuth->start(); if ($myAuth->getAuth()) { var_dump($myAuth); session_register('test"); $test = "blah"; } ?> ---- result of var_dump($myAuth) after logging is: --- Array ( [test] =>"blah" [auth] => Array ( [registered] => 1 [username] => zbiru [timestamp] => 1015607331 [idle] => 1015607331 ) ) Now, when I try to go to other site e.g. <a href="another.php?<?=sid=sesson_name()?>=<?=session_id()?>">next</a> where another.php contains: <?php require_once ... $myAuth = new MyAuth(true); $myAuth->start(); var_dump($myAuth); ?> I LOST 'auth' variable! i CAN SEE ONLY session registered variable 'test'. What is goin' on??? I am sure that 'auth' variable is not unregistered (by session_unregister()) at logout() function in Auth() class, because I added some private code there. It is very strange. Variable auth is registered, not explicite unregistered, but it in some kind is null...and I lost my authorization on another pages. :-( Anybody can help? -- RobW

« previous php.pear.webmaster (#68) next »