Session express when I use ajax imap |
Hello,
I use ajax to call some imap functions how ever the session tends to expire before the sess_expiration 7200 limit. I am not sure if it is some thing to do with session_time_to_update? Any suggestions what I should change? PHP Code: $config['sess_driver'] = 'files';
The session expiration time.
There is also a CodeIgniter method for checking Ajax calls. PHP Code: if (is_ajax_request()) What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
you can basically disable the session updates when AJAX calls are made. This code should go in /application/libraries/MY_Session.php
<?php class MY_Session extends CI_Session { /** * Update an existing session * * @access public * @return void */ function sess_update() { // skip the session update if this is an AJAX call! This is a bug in CI; see: // https://github.com/EllisLab/CodeIgniter/issues/154 // http://codeigniter.com/forums/viewthread/102456/P15 if ( !($this->CI->input->is_ajax_request()) ) { parent:ess_update(); } } } |
Welcome Guest, Not a member yet? Register Sign In |