11-16-2010, 08:41 AM
[eluser]SPeed_FANat1c[/eluser]
I put
system/application/config/constants.php
and
called it MY_Session.php and added to system/application/libraries
and still get random disconnects. Now more rarely but still. What else can be causing those disconnects?
I put
Code:
// Define Ajax Request
define('IS_AJAX', isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
system/application/config/constants.php
and
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* ------------------------------------------------------------------------
* CI Session Class Extension.
* ------------------------------------------------------------------------
*
*
*/
class MY_Session extends CI_Session {
/*
* Do not update an existing session on ajax calls
*
* @access public
* @return void
*/
public function sess_update()
{
if ( ! IS_AJAX)
{
parent::sess_update();
}
}
function sess_destroy()
{
parent::sess_destroy();
$this->userdata = array();
}
}
// ------------------------------------------------------------------------
/* End of file MY_Session.php */
/* Location: ./application/libraries/MY_Session.php */
called it MY_Session.php and added to system/application/libraries
and still get random disconnects. Now more rarely but still. What else can be causing those disconnects?