• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Session lost on ci 1.7.2

#5
[eluser]InsiteFX[/eluser]
One way to work around it!
Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
* ------------------------------------------------------------------------
* CI Session Class Extension for AJAX calls.
* ------------------------------------------------------------------------
*
* Save as application/libraries/MY_Session.php
*/

class MY_Session extends CI_Session {

    // --------------------------------------------------------------------

    /**
     * sess_update()
     *
     * Do not update an existing session on ajax calls
     *
     * @access    public
     * @return    void
     */
    public function sess_update()
    {
        if (is_ajax_request())
        {
            // set a higher timeout for Ajax calls.
            $this->sess_time_to_update = 1200;    // raise if you need more time!
            parenet::sess_update();
        }
    }

    // --------------------------------------------------------------------

    /**
     * sess_destroy()
     *
     * Clear's out the user_data array on sees::destory.
     *
     * @access    public
     * @return    void
     */
    public function sess_destroy()
    {
        $this->userdata = array();
        parent::sess_destroy();
    }

}

// ------------------------------------------------------------------------
/* End of file MY_Session.php */
/* Location: ./application/libraries/MY_Session.php */

InsiteFX


Messages In This Thread
Session lost on ci 1.7.2 - by El Forum - 04-10-2011, 02:14 AM
Session lost on ci 1.7.2 - by El Forum - 04-10-2011, 07:25 AM
Session lost on ci 1.7.2 - by El Forum - 04-10-2011, 08:48 AM
Session lost on ci 1.7.2 - by El Forum - 04-10-2011, 09:56 AM
Session lost on ci 1.7.2 - by El Forum - 04-10-2011, 10:30 AM
Session lost on ci 1.7.2 - by El Forum - 04-12-2011, 08:27 PM
Session lost on ci 1.7.2 - by El Forum - 04-13-2011, 03:03 AM
Session lost on ci 1.7.2 - by El Forum - 04-13-2011, 03:36 AM
Session lost on ci 1.7.2 - by El Forum - 04-13-2011, 04:17 AM
Session lost on ci 1.7.2 - by El Forum - 04-13-2011, 01:52 PM
Session lost on ci 1.7.2 - by El Forum - 04-13-2011, 07:58 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.