Welcome Guest, Not a member yet? Register   Sign In
Tank_Auth error message when session expires
#1

[eluser]jeanv[/eluser]
Hi !

i'm using Tank_Auth library, and it works very well excepted for one thing: when session (stored in database) expires there's this error message:

Code:
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at E:\program_files\wamp\www\codeigniter\app_ci\controllers\contact.php:1)

Filename: libraries/Session.php

Line Number: 408

and the same message for line 662,

and this message:

Code:
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at E:\program_files\wamp\www\codeigniter\app_ci\controllers\contact.php:1)

Filename: helpers/url_helper.php

Line Number: 541

here is my code in contact controller:

Code:
function __construct()
    {
        parent::Controller();
        
        $this->load->library('tank_auth');
                if (!$this->tank_auth->is_logged_in()) {
            redirect('/auth/login/');
        } else {
            $data['user_id']    = $this->tank_auth->get_user_id();
            $data['username']    = $this->tank_auth->get_username();
            $data['online_users']    = $this->tank_auth->count_online_users(); // new function

            $this->load->vars($data);
        
            // load model
            $this->load->model('mdl_contact','',TRUE);
        }
    }

Anyone can help please ?

the only solution i found is to put value 0 to $config['sess_expiration'] but it's not a real solution.


Messages In This Thread
Tank_Auth error message when session expires - by El Forum - 12-02-2009, 05:07 AM
Tank_Auth error message when session expires - by El Forum - 12-02-2009, 10:04 AM
Tank_Auth error message when session expires - by El Forum - 12-02-2009, 10:22 AM
Tank_Auth error message when session expires - by El Forum - 12-03-2009, 03:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB