CodeIgniter Forums

Full Version: [SOLVED] Using flashdata = session lost ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]shaoling[/eluser]
Hello,

I have a authentification form (Admin Zone, Back-end) where I use a flashdata for a Welcome Message to the user.

If I delete the set_flashdata('welcome_message', 'Welcome ...'), I can access to the admin zone, but if I write the set_flashdata('welcome_message', 'Welcome ...') (at the form_validation->run()), it seems that the session is lost and it returns on the login form...

See by yourself : http://www.kayadesign.fr/admin/login

How can you explain that? How can I fix this ?

I have the same" bug" when I want to use the set_flashdata after an editing form to write the successful operation/submitting...

(Sorry for my english, I'm french ^^)

Thanks !

My Session Config :
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_expire_on_close'] = FALSE;
$config['sess_encrypt_cookie'] = FALSE;
$config['sess_use_database'] = FALSE;
$config['sess_table_name'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update'] = 300;

El Forum

[eluser]WanWizard[/eluser]
What else is stored in that session?

You're not using the database, so you might hit the 4Kb size limit of the cookie with that extra message.
Once you're over the limit, the cookie gets corrupted, and the session is no longer valid.

El Forum

[eluser]shaoling[/eluser]
That's right !!!

I set up the database and it works perfectly !

Thanks a lot !!