Welcome Guest, Not a member yet? Register   Sign In
Session lost AJAX CI 3.x
#1

Hi,

I have a big issue, my site use hard AJAX request, in that request we set or get some sessions variables, but we detected that after we set the sessions we get correctly the information of the sessions. ex:

echo $this->session->userdata("uid");
Result: iywgc87123rfvc2345thbvc45tygerfgv;

But if we make some AJAX request after to set the session and print the same variable we have an error that said that the property not are set... and if we print all session information the array is empty.

We are using the files driver, and the session are created in files.

We found in others forums that in CI 2.x had the same issues with AJAX, and found some classes that extend the Session library, but that libraries not works for CI 3.x

This is my config:

$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = sys_get_temp_dir();
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

So, some can help me pls? exist some fix for this?
Reply


Messages In This Thread
Session lost AJAX CI 3.x - by tnathos - 05-09-2017, 05:21 PM
RE: Session lost AJAX CI 3.x - by webdev25 - 05-09-2017, 10:47 PM
RE: Session lost AJAX CI 3.x - by raknjak - 05-10-2017, 08:26 AM
RE: Session lost AJAX CI 3.x - by GENCODE LIMITED - 10-31-2019, 01:25 AM
RE: Session lost AJAX CI 3.x - by InsiteFX - 11-01-2019, 03:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB