title: session destroying in codeigniter after redirecting
body: <p>In my login controller i have stored all user data in session. i have verified also by printing </p>
  
  <blockquote>
    <p>all_userdata();</p>
  </blockquote>
  
  <p>when redirected  to another controller <strong>home</strong> the session was destroyed. please help me to solve this issue. The session data is as follows.</p>
  
  <pre><code>Array
  (
  [session_id] =&gt; 11c8450a10e6f944c97f13841ccea0c2
  [ip_address] =&gt; 127.0.0.1
  [user_agent] =&gt; Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36
  [last_activity] =&gt; 1408779229
  [user_data] =&gt; 
  [id] =&gt; 432
  [empid] =&gt; 1024
  [username] =&gt; 
  [email] =&gt; gvsvinayak@gmail.com
  [fullname] =&gt; G V S Vinayak
  [usertype] =&gt; staff
  [logged_in] =&gt; 1
  [access] =&gt; Array
      (
          [menu] =&gt; Array
              (
                  [0] =&gt; Array
                      (
                          [menu_title] =&gt; Home
                          [can_edit] =&gt; 1
                          [can_delete] =&gt; 1
                          [can_view] =&gt; 1
                          [parent] =&gt; 0
                          [id] =&gt; 1
                      )
  
                  [1] =&gt; Array
                      (
                          [menu_title] =&gt; Blocked Domains
                          [can_edit] =&gt; 1
                          [can_delete] =&gt; 1
                          [can_view] =&gt; 1
                          [parent] =&gt; 0
                          [id] =&gt; 2
                      )
  
                  [2] =&gt; Array
                      (
                          [menu_title] =&gt; List of Companies
                          [can_edit] =&gt; 1
                          [can_delete] =&gt; 1
                          [can_view] =&gt; 1
                          [parent] =&gt; 0
                          [id] =&gt; 3
                      )
  
                  [3] =&gt; Array
                      (
                          [menu_title] =&gt; Full Registrations
                          [can_edit] =&gt; 1
                          [can_delete] =&gt; 1
                          [can_view] =&gt; 1
                          [parent] =&gt; 3
                          [id] =&gt; 4
                      )
  
                  [4] =&gt; Array
                      (
                          [menu_title] =&gt; Partial Registrations
                          [can_edit] =&gt; 1
                          [can_delete] =&gt; 1
                          [can_view] =&gt; 1
                          [parent] =&gt; 3
                          [id] =&gt; 5
                      )
  
                  [5] =&gt; Array
                      (
                          [menu_title] =&gt; Staff
                          [can_edit] =&gt; 1
                          [can_delete] =&gt; 1
                          [can_view] =&gt; 1
                          [parent] =&gt; 0
                          [id] =&gt; 6
                      )
  
                  [6] =&gt; Array
                      (
                          [menu_title] =&gt; Add Satff
                          [can_edit] =&gt; 1
                          [can_delete] =&gt; 1
                          [can_view] =&gt; 1
                          [parent] =&gt; 6
                          [id] =&gt; 8
                      )
  
                  [7] =&gt; Array
                      (
                          [menu_title] =&gt; View All
                          [can_edit] =&gt; 1
                          [can_delete] =&gt; 1
                          [can_view] =&gt; 1
                          [parent] =&gt; 6
                          [id] =&gt; 9
                      )
  
                  [8] =&gt; Array
                      (
                          [menu_title] =&gt; Cloud Instances
                          [can_edit] =&gt; 1
                          [can_delete] =&gt; 1
                          [can_view] =&gt; 1
                          [parent] =&gt; 0
                          [id] =&gt; 7
                      )
  
                  [9] =&gt; Array
                      (
                          [menu_title] =&gt; Search
                          [can_edit] =&gt; 1
                          [can_delete] =&gt; 1
                          [can_view] =&gt; 1
                          [parent] =&gt; 0
                          [id] =&gt; 10
                      )
  
              )
  
          [companytabs] =&gt; Array
              (
                  [0] =&gt; Array
                      (
                          [tab_name] =&gt; Company Profile
                          [can_edit] =&gt; 1
                          [can_delete] =&gt; 1
                          [can_view] =&gt; 1
                          [id] =&gt; 1
                      )
  
                  [1] =&gt; Array
                      (
                          [tab_name] =&gt; VM Details
                          [can_edit] =&gt; 1
                          [can_delete] =&gt; 1
                          [can_view] =&gt; 1
                          [id] =&gt; 2
                      )
  
                  [2] =&gt; Array
                      (
                          [tab_name] =&gt; Support
                          [can_edit] =&gt; 1
                          [can_delete] =&gt; 1
                          [can_view] =&gt; 1
                          [id] =&gt; 3
                      )
  
                  [3] =&gt; Array
                      (
                          [tab_name] =&gt; Monitors
                          [can_edit] =&gt; 1
                          [can_delete] =&gt; 1
                          [can_view] =&gt; 1
                          [id] =&gt; 4
                      )
  
                  [4] =&gt; Array
                      (
                          [tab_name] =&gt; Users
                          [can_edit] =&gt; 1
                          [can_delete] =&gt; 1
                          [can_view] =&gt; 1
                          [id] =&gt; 5
                      )
  
                  [5] =&gt; Array
                      (
                          [tab_name] =&gt; Orders
                          [can_edit] =&gt; 1
                          [can_delete] =&gt; 1
                          [can_view] =&gt; 1
                          [id] =&gt; 6
                      )
  
                  [6] =&gt; Array
                      (
                          [tab_name] =&gt; Invoices
                          [can_edit] =&gt; 1
                          [can_delete] =&gt; 1
                          [can_view] =&gt; 1
                          [id] =&gt; 7
                      )
  
              )
  
      )
  </code></pre>
  
  <p>)</p>