Disallowed Key Characters – CodeIgniter Error

Getting the error “Disallowed Key Characters” ? This error was caused by developing locally on my machine (127.0.0.1) with xampp, i used the windows host file to re-direct halodev.snaver.net to my local web server for development. However when i switched to developing online, i removed the host file config for the domain and then upload my website to my server, this is when i got the error.

To fix i had to clear my cookies, i believe it was a cookie problem as i also changed my unique $config['encryption_key'] in the config file.

Related posts:

  1. FirePHP Codeigniter – Fatal error: Call to undefined method FirePHP_Fake::error() in /server/path/
  2. stat failed filemtime() Codeigniters assetlib-pro on a plesk server
  3. Weird iGoogle Homepage Error
  4. Installing Adobe Creative Suite 4 Master Collection Windows 7
  5. Halomods.com and The Halo Modding Future
Leave a comment

1 Comments.

  1. This error drove me nuts for quite some time. Even your suggestion didn’t fix the problem. Here is what I did to find the issue.

    In the core CI code in system/libraries is a file called input.php I made a small modification to that file so that it would show the actual data in question.

    Around line number 199

    function _clean_input_keys($str)
    {
    if ( ! preg_match(“/^[a-z0-9:_\/-]+$/i”, $str))
    {
    exit(‘Disallowed Key Characters: ‘.$str); // Added the variable to display.
    }

    return $str;
    }

    I certainly hope this helps others.

Leave a Reply


[ Ctrl + Enter ]