Welcome Guest, Not a member yet? Register   Sign In
Login Function Works Locally But Not When Live?
#1

[eluser]JamesTaylor[/eluser]
I am using the following code to check whether a user is logged in, it works as expected when used in the local environment but now i have uploaded the site to a temporary live location it doesn't work?

Whats strange is that i'm sure this work previously when i had uploaded to a temporary live location and the code hasn't been changed since?? That could just be an issue i didn't notice at the time but it would be a pretty big thing to miss!

Code:
class Home extends MY_Controller {

//Makes check for logged in run each time
    function __construct(){
    parent::MY_Controller();    
    
    $this->checklogin();
        
    $this->output->set_header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . ' GMT');
    $this->output->set_header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
    $this->output->set_header('Pragma: no-cache');
    $this->output->set_header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');    
    }    
    
//Check Session data to see if logged in    
    function checklogin()
    {
    $admin_is_logged_in = $this->session->userdata('admin_is_logged_in');
    
    if(!isset($admin_is_logged_in) || $admin_is_logged_in !=true)
        {
            redirect("Admin/LogIn");
        }
    }

It seems that at present the when view in the live location none of the code function __construct() is actually run as if i place an echo value anywhere within it nothing is returned, yet when i do this locally the echo value is written as the 1st thing on the page??

Can anyone point out my wher emy mistake is here?


Messages In This Thread
Login Function Works Locally But Not When Live? - by El Forum - 01-19-2010, 10:54 AM
Login Function Works Locally But Not When Live? - by El Forum - 01-19-2010, 11:20 AM
Login Function Works Locally But Not When Live? - by El Forum - 01-19-2010, 11:22 AM
Login Function Works Locally But Not When Live? - by El Forum - 01-19-2010, 11:52 AM
Login Function Works Locally But Not When Live? - by El Forum - 01-19-2010, 12:25 PM
Login Function Works Locally But Not When Live? - by El Forum - 01-19-2010, 12:27 PM
Login Function Works Locally But Not When Live? - by El Forum - 01-19-2010, 12:28 PM
Login Function Works Locally But Not When Live? - by El Forum - 01-19-2010, 12:54 PM
Login Function Works Locally But Not When Live? - by El Forum - 01-19-2010, 12:58 PM
Login Function Works Locally But Not When Live? - by El Forum - 01-19-2010, 12:58 PM
Login Function Works Locally But Not When Live? - by El Forum - 01-19-2010, 01:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB