Re: Auth and Register Globals

From: Date: Thu, 06 Mar 2003 18:09:39 +0000
Subject: Re: Auth and Register Globals
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4070@lists.php.net to get a copy of this message
Sorry, Auth 1.1.1 Auth.php 333 function start() 334 { 335 $this->assignData(); 336 337 session_start(); 338 339 if (!$this->checkAuth()) { 340 $this->login(); 341 } 342 } Fatal error: Call to a member function on a non-object in Auth/Auth.php on line 339 Unless you think I'm calling (somehow) back into the class before it is properly initialized... I presume to call $myauth->start() I would have to have $myauth already contructed to an Auth class. I did add a check in the code: $myauth = new Auth( "DB", $someAuthOptions, 'myloginform', false); // start it up if(isset($myauth) && is_a($myauth, "Auth")) { $myauth->start(); ... } > On Wed Mar 05, 2003 at 09:0435PM -0500, Jack Kline wrote: > > Is anyone aware of Auth not working when the PHP "register_globals=On"? > > I've been using Auth in my latest website delivery and its been working as > > expected in my development env (Apache 1.3.27, PHP 4.3.1, MySql 3.23.47 > > running on Win XP) with the "register_globals=Off". When I installed my code > > recently to an ISP, the Auth starting throwing the exception "Fatal error: > > Call to a member function on a non-object" in the Auth->start() method on > > the line "if(!$this->checkAuth()))" > > What version of PEAR::Auth do you use. Can you show us the relevant > lines that can helps us to reproduce this? > > -- > - Martin Martin Jansen > http://martinjansen.com/

« previous php.pear.general (#4070) next »