Disallowed Key Characters - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Disallowed Key Characters (/showthread.php?tid=40467) |
Disallowed Key Characters - El Forum - 04-09-2011 [eluser]Peter Lubambi[/eluser] Hi all, I am new to codeigniter. I always get this error 'Disallowed Key Characters' whenever I try to submit my form to save into the database. I have tried some solutions from net like deleting my cookies history but still I get the error.... any idea on how to get rid of this. thanks in advance. Disallowed Key Characters - El Forum - 04-09-2011 [eluser]toopay[/eluser] are you using the closing '?>' at controller or model? If yes, remove any of that (and whitespace after your very end line) Disallowed Key Characters - El Forum - 04-09-2011 [eluser]ClaudioX[/eluser] Look if you're trying send a url with disallowed characters. for exemplo: "http://www.myurl.com/send_form/values/@>*&morethings;" Disallowed Key Characters - El Forum - 04-09-2011 [eluser]osci[/eluser] in application/config.php Code: /* you can permit more characters there but watch for DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!! Disallowed Key Characters - El Forum - 04-10-2011 [eluser]toopay[/eluser] @Claudio & osci, there is nothing to do with character beeing send in browser addressbar or 'config['permitted_uri_chars']. This error ussually means one thing : an extra line break. The line feed (LF) and carriage return (CR) characters (and their hex code equivalents ( and ) are forbidden in CodeIgniter’s framework. Disallowed Key Characters - El Forum - 04-10-2011 [eluser]toopay[/eluser] their hex code equivalents Code: ( and Disallowed Key Characters - El Forum - 04-10-2011 [eluser]ClaudioX[/eluser] Hum, its possible @toopay, but when i get this error you mean, the usually mensage is something like: "the output already send", but better for @peter, he have more things to check. Disallowed Key Characters - El Forum - 04-10-2011 [eluser]InsiteFX[/eluser] Take a look at the system/core/Input.php class and _clean_input_keys($str) InsiteFX Disallowed Key Characters - El Forum - 04-10-2011 [eluser]toopay[/eluser] if you send disallowed character in the browser address bar, it should generate an error like.. Quote:An Error Was Encountered 'Disallowed Key Characters', an error which Peter face with, more probably because an extra line break OR... its generated by '_clean_input_key()' function in CodeIgniter Input Class (which means Peter send disallowed character in $_GET or $_POST variable, not URI), and as i stated above, there is nothing to do with character beeing send in browser addressbar or 'config['permitted_uri_chars']. Disallowed Key Characters - El Forum - 04-11-2011 [eluser]Peter Lubambi[/eluser] Thanks everyone, it's true that I was sending disallowed characters on the smile, see these lines $fname=array('name'=>'fname','id'=>'fname','type'=>'text'); echo "<p>First Name: ".form_input('$fname' nake: )."</p><br />"; was supposed to be echo "<p>First Name: ".form_input($fname)."</p><br />"; |