phpcodeigniter

Returning back to login page


After login i am redirecting user to forum controller, but somehow it execute constrctor but do not enter into index() function. when i try to exit("line 7") its stop execution, but when i try to exit in index it wont

<?php
class Forum extends CI_Controller
{
    public function __construct() {
        parent::__construct();
        $this->load->model('ForumModel');   
            //exit("line 7");
    }
    function index()
    {
        exit("line9");
        //print_r($this->session->userdata);

Any help appreciated!!


Solution

  • After struggling a complete week i got the answer-

    Session values are getting destroy by codeigniter.

    By default CodeIgniter stores the session data in a cookie, which has an upper limit of 2KB-4KB in size depending on browser. If you are trying to store more than 4KB of data in the session you will start running into issues.

    So i opted to store session values in DB.