Welcome Guest, Not a member yet? Register   Sign In
Session not continuing after page changes.
#1

[eluser]Unknown[/eluser]
Hey Guys!

Believe it or not, this randomly started happening when I woke up one morning. I am able to create sessions when logging in, but as soon as the page changes, the session is not longer available. In All Browsers.

In the following code, it creates the session, immediately after it checks to see if it was created, it it was, it is redirected to /main

Code:
$cookie = array(
        'uid' => $row->id,
        'logged_in' => TRUE
    );

    $this->session->set_userdata($cookie);

if($this->session->userdata('logged_in')) {

    $this->log->insert('Loggin : Success', $row->username);

    $header_data['error'] = "Redirecting...";

    header('Location: /main');

} else {

    echo 'Error';

}

On the Main page, I have it also checking for a session and returns that there is no session found. I've checked this also to ensure the code was infact correct and placed this at the top of the main page and nothing is returned.

Code:
echo 'Session ID : '.$this->session->userdata('uid');

I really need help on this, I'm out of options.

Location is http://admin.kickradio.ca/




Theme © iAndrew 2016 - Forum software by © MyBB