Welcome Guest, Not a member yet? Register   Sign In
Codeigniter session problem
#1

[eluser]Unknown[/eluser]
I am facing problems in codeigniter 2.x session class.

I have 2 views and 1 controller
one view one i had a login form when a user submits the form
i validate it and create session user data by calling a method within controller as

Code:
function create_session($data) {        
        $mydata = array(
                   'userid'  => $data,
                   'role'     => $role,
                   'logged_in' => TRUE
               );
        
        $this->session->set_userdata($mydata);
        
        return;
    }

then my 2nd view is loaded
and i have on that view
Code:
print_r($this->session->userdata);

and it print out the right results

but when i click on 1st view in navigation
i fond that
Code:
[userdata] =>
its empty

my session configuration is as

Code:
$config['encryption_key'] = 'askdfjowieuriomzx,mv';
$config['sess_cookie_name'] = 'wana_session';
$config['sess_expiration'] = 7200;
$config['sess_expire_on_close'] = FALSE;
$config['sess_encrypt_cookie'] = TRUE;
$config['sess_use_database'] = TRUE;
$config['sess_table_name'] = 'wana_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update'] = 300;


I have searched the forums, but i can't solve this problem
please solve this issue
Thanks
#2

[eluser]Reneesh T K[/eluser]
I have a shopping cart site with codeigniter frame work and it was showing session out when adding more than hundreds of products.

I have solved the issue by changing the database field type of user_data in session table.

Please check more info about it in

http://myphplibrary.blogspot.in/2012/03/...ation.html
#3

[eluser]ronaldlayanto[/eluser]
[quote author="John Murowaniecki" date="1324402955"]Right now I am having problems in a client session: his system works correctly in the development environment (internal server, mine) but does not work in client server. However I have not had time yet to give exclusivity to the client.

But soon I'll debug this. Smile[/quote]

Hi, i have the same problem too
My cart working properly in my development server, but it doesn't work in live/production server
In my dev server, I can add item to cart, but in the production server it's just not working
Do u have any clue why is this happen?

Thanks before
#4

[eluser]bhaskarudu[/eluser]
See this post#31

http://ellislab.com/forums/viewthread/135722/P30




Theme © iAndrew 2016 - Forum software by © MyBB