Kohana Auth Library Deployment

Posted by Steve on Stack Overflow See other posts from Stack Overflow or by Steve
Published on 2010-03-28T15:45:01Z Indexed on 2010/03/28 15:53 UTC
Read the original article Hit count: 217

Filed under:
|
|

My Kohana app runs perfectly on my local machine.

When I deployed my app to a server (and adjust the config files appropriately), I can no longer log into the app.

I've traced through the app login routine on both my local version and the server version and they both agree with each other all the way through until you get to the auth.php controller logged_in() routine where suddenly, at line 140 - the is_object($this->user) test - the $user object no longer exists!?!?!?

The login() function call that calls the logged_in() function successfully passes the following test, which causes a redirect to the logged_in() function.

if(Auth::instance()->login($user, $post['password'])) 

Yes, the password and hash, etc all work perfectly.

Here is the offending code:

public function logged_in()
{
    if ( ! is_object($this->user))
    {
    // No user is currently logged in
    url::redirect('auth/login'); 
    }
etc...
}

As the code is the same between my local installation and the server, I reckon it must be some server setting that is messing with me.

FYI: All the rest of the code works because I have a temporary backdoor available that allows me to use the application (view pages of tables, etc) without being logged in.

Any ideas?

© Stack Overflow or respective owner

Related posts about kohana

Related posts about authentication