OK I've spent 3 days trying to find out what's going on here and I'm stumped.
The site is built with CI. (http://horizoneslchina.com)
For a while I was getting Disallowed Key Characters whenever anyone in China.
I extended the core Input class with the following:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Input extends CI_Input {
function _clean_input_keys($str)
{
$config=&get_config('config');
if(!preg_match("/^[".$config['permitted_uri_chars']."]+$/i",rawurlencode($str)))
{
exit('Disallowed Key Characters. '.$str);
}
//CleanUTF-8ifsupported
if(UTF8_ENABLED===TRUE)
{
$str=$this->uni->clean_string($str);
}
return $str;
}
}
/* End of file My_Input.php */
It seemed to resolve that issue, but now I have the situation where no ones session will stay intact. When someone in China logs in, and tries to access any of the secure pages, it immediate kills the session.
This doesn't happen in Australia and it doesn't happen in India. The only difference I've been able to find is on the Chinese systems a comma is getting placed in front of session names. EG ,_ci_session and the above function was throwing this back out as the problem before.
Does anyone have any ideas at all about this?
Every country bans some servers outside country for national security. Check whether your servers is banned or not.
Though there are a large number of possible causes (CodeIgniter sessions are notorious for being glitchy) this is likely a timezone issue, not a character issue.
To fix the problem—assuming you do not need a low timeout—increase the session timeout!