<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Debugging tip: &#8220;Disallowed Key Character&#8221; error in CodeIgniter</title>
	<atom:link href="http://tiffanybbrown.com/2008/05/06/debugging-tip-disallowed-key-character-error-in-codeigniter/feed/" rel="self" type="application/rss+xml" />
	<link>http://tiffanybbrown.com/2008/05/06/debugging-tip-disallowed-key-character-error-in-codeigniter/</link>
	<description>A web log about web development and internet culture with frequent detours into other stuff.</description>
	<lastBuildDate>Tue, 15 May 2012 22:15:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: NexusRex</title>
		<link>http://tiffanybbrown.com/2008/05/06/debugging-tip-disallowed-key-character-error-in-codeigniter/comment-page-1/#comment-93666</link>
		<dc:creator>NexusRex</dc:creator>
		<pubDate>Thu, 25 Nov 2010 17:16:00 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1285#comment-93666</guid>
		<description>I am also getting this when I have non-english character &quot;ö&quot; in the URI. Anybody know a fix for that?</description>
		<content:encoded><![CDATA[<p>I am also getting this when I have non-english character &#8220;ö&#8221; in the URI. Anybody know a fix for that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matthewfedak</title>
		<link>http://tiffanybbrown.com/2008/05/06/debugging-tip-disallowed-key-character-error-in-codeigniter/comment-page-1/#comment-92176</link>
		<dc:creator>matthewfedak</dc:creator>
		<pubDate>Mon, 16 Aug 2010 16:07:00 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1285#comment-92176</guid>
		<description>I just experienced this as I had a file name &lt;input type=&quot;text&quot; name=field&quot; /&gt; and was missing the first quote.</description>
		<content:encoded><![CDATA[<p>I just experienced this as I had a file name<br />
<input type="text" name=field" /> and was missing the first quote.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kalodont</title>
		<link>http://tiffanybbrown.com/2008/05/06/debugging-tip-disallowed-key-character-error-in-codeigniter/comment-page-1/#comment-92130</link>
		<dc:creator>kalodont</dc:creator>
		<pubDate>Mon, 12 Jul 2010 13:27:53 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1285#comment-92130</guid>
		<description>This might be a bit off-topic, but might help someone seeking a solution for &quot;Disallowed Key Character&quot; in CI. The error may be also triggered by sending POST form data with POST array key names that contain &quot;non-english&quot; characters - I mean leters like ó or ń.</description>
		<content:encoded><![CDATA[<p>This might be a bit off-topic, but might help someone seeking a solution for &#8220;Disallowed Key Character&#8221; in CI. The error may be also triggered by sending POST form data with POST array key names that contain &#8220;non-english&#8221; characters &#8211; I mean leters like ó or ń.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glen Barnhardt</title>
		<link>http://tiffanybbrown.com/2008/05/06/debugging-tip-disallowed-key-character-error-in-codeigniter/comment-page-1/#comment-92126</link>
		<dc:creator>Glen Barnhardt</dc:creator>
		<pubDate>Fri, 02 Jul 2010 02:38:55 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1285#comment-92126</guid>
		<description>Hi Tiffany,&lt;br&gt;&lt;br&gt;This error drove me nuts for quite some time. Even your suggestion didn&#039;t fix the problem. Here is what I did to find the issue.&lt;br&gt;&lt;br&gt;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.&lt;br&gt;&lt;br&gt;Around line number 199&lt;br&gt;&lt;br&gt;	function _clean_input_keys($str)&lt;br&gt;	{	&lt;br&gt;		 if ( ! preg_match(&quot;/^[a-z0-9:_/-]+$/i&quot;, $str))&lt;br&gt;		 {&lt;br&gt;			exit(&#039;Disallowed Key Characters: &#039;.$str);   // Added the variable to display.&lt;br&gt;		 }&lt;br&gt;&lt;br&gt;		return $str;&lt;br&gt;	}&lt;br&gt;&lt;br&gt;I certainly hope this helps others.</description>
		<content:encoded><![CDATA[<p>Hi Tiffany,</p>
<p>This error drove me nuts for quite some time. Even your suggestion didn&#39;t fix the problem. Here is what I did to find the issue.</p>
<p>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.</p>
<p>Around line number 199</p>
<p>	function _clean_input_keys($str)<br />	{	<br />		 if ( ! preg_match(&#8220;/^[a-z0-9:_/-]+$/i&#8221;, $str))<br />		 {<br />			exit(&#39;Disallowed Key Characters: &#39;.$str);   // Added the variable to display.<br />		 }</p>
<p>		return $str;<br />	}</p>
<p>I certainly hope this helps others.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tiffanybbrown</title>
		<link>http://tiffanybbrown.com/2008/05/06/debugging-tip-disallowed-key-character-error-in-codeigniter/comment-page-1/#comment-92046</link>
		<dc:creator>tiffanybbrown</dc:creator>
		<pubDate>Fri, 29 Jan 2010 23:27:56 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1285#comment-92046</guid>
		<description>Vlad, delete *anything* after the closing ?&gt; -- including white space and line breaks -- or remove the ?&gt;.</description>
		<content:encoded><![CDATA[<p>Vlad, delete *anything* after the closing ?&gt; &#8212; including white space and line breaks &#8212; or remove the ?&gt;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vlad</title>
		<link>http://tiffanybbrown.com/2008/05/06/debugging-tip-disallowed-key-character-error-in-codeigniter/comment-page-1/#comment-92044</link>
		<dc:creator>Vlad</dc:creator>
		<pubDate>Mon, 25 Jan 2010 13:39:09 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1285#comment-92044</guid>
		<description>WOW...........anyone here talk English :-?, like what button do I  press to get rid off the annoying &quot;Disallowed Key Characters&quot; there is obviously a solution, I just haven&#039;t found one in English yet, only in ITist&lt;br&gt;I get it while replying on Mercatornet, and that seem to be the only sight.</description>
		<content:encoded><![CDATA[<p>WOW&#8230;&#8230;&#8230;..anyone here talk English <img src='http://tiffanybbrown.com/wp-includes/images/smilies/icon_confused.gif' alt=':-?' class='wp-smiley' /> , like what button do I  press to get rid off the annoying &#8220;Disallowed Key Characters&#8221; there is obviously a solution, I just haven&#39;t found one in English yet, only in ITist<br />I get it while replying on Mercatornet, and that seem to be the only sight.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anon</title>
		<link>http://tiffanybbrown.com/2008/05/06/debugging-tip-disallowed-key-character-error-in-codeigniter/comment-page-1/#comment-91741</link>
		<dc:creator>anon</dc:creator>
		<pubDate>Sat, 14 Nov 2009 09:14:43 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1285#comment-91741</guid>
		<description>I have experienced this error as well when I am in a hurry and forget to close my form tag </description>
		<content:encoded><![CDATA[<p>I have experienced this error as well when I am in a hurry and forget to close my form tag </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anon</title>
		<link>http://tiffanybbrown.com/2008/05/06/debugging-tip-disallowed-key-character-error-in-codeigniter/comment-page-1/#comment-93219</link>
		<dc:creator>anon</dc:creator>
		<pubDate>Sat, 14 Nov 2009 09:14:00 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1285#comment-93219</guid>
		<description>I have experienced this error as well when I am in a hurry and forget to close my form tag</description>
		<content:encoded><![CDATA[<p>I have experienced this error as well when I am in a hurry and forget to close my form tag</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tiffanybbrown</title>
		<link>http://tiffanybbrown.com/2008/05/06/debugging-tip-disallowed-key-character-error-in-codeigniter/comment-page-1/#comment-91707</link>
		<dc:creator>tiffanybbrown</dc:creator>
		<pubDate>Mon, 02 Nov 2009 17:54:26 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1285#comment-91707</guid>
		<description>Thanks for restating what iBSpoof, manafta, and Ben all said above. White space errors are not CodeIgniter specific. PHP will display a &quot;Cannot send header&quot; error.  
 
&quot;Disallowed Key Character,&quot; however, IS the specific language CodeIgniter uses. That, in my opinion isn&#039;t as clear or familiar as the PHP error and can trip up users new to both. That&#039;s what this post is addressing. </description>
		<content:encoded><![CDATA[<p>Thanks for restating what iBSpoof, manafta, and Ben all said above. White space errors are not CodeIgniter specific. PHP will display a &quot;Cannot send header&quot; error.  </p>
<p>&quot;Disallowed Key Character,&quot; however, IS the specific language CodeIgniter uses. That, in my opinion isn&#039;t as clear or familiar as the PHP error and can trip up users new to both. That&#039;s what this post is addressing. </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tiffanybbrown</title>
		<link>http://tiffanybbrown.com/2008/05/06/debugging-tip-disallowed-key-character-error-in-codeigniter/comment-page-1/#comment-93218</link>
		<dc:creator>tiffanybbrown</dc:creator>
		<pubDate>Mon, 02 Nov 2009 17:54:00 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1285#comment-93218</guid>
		<description>Thanks for restating what iBSpoof, manafta, and Ben all said above. White space errors are not CodeIgniter specific. PHP will display a &quot;Cannot send header&quot; error.  
 
&quot;Disallowed Key Character,&quot; however, IS the specific language CodeIgniter uses. That, in my opinion isn&#039;t as clear or familiar as the PHP error and can trip up users new to both. That&#039;s what this post is addressing.</description>
		<content:encoded><![CDATA[<p>Thanks for restating what iBSpoof, manafta, and Ben all said above. White space errors are not CodeIgniter specific. PHP will display a &quot;Cannot send header&quot; error.  </p>
<p>&quot;Disallowed Key Character,&quot; however, IS the specific language CodeIgniter uses. That, in my opinion isn&#039;t as clear or familiar as the PHP error and can trip up users new to both. That&#039;s what this post is addressing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Everett</title>
		<link>http://tiffanybbrown.com/2008/05/06/debugging-tip-disallowed-key-character-error-in-codeigniter/comment-page-1/#comment-91706</link>
		<dc:creator>Everett</dc:creator>
		<pubDate>Mon, 02 Nov 2009 17:16:10 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1285#comment-91706</guid>
		<description>It&#039;s not just CodeIgniter... this is a &quot;feature&quot; of PHP.  It&#039;s best to leave off the closing tag unless it&#039;s required. </description>
		<content:encoded><![CDATA[<p>It&#039;s not just CodeIgniter&#8230; this is a &quot;feature&quot; of PHP.  It&#039;s best to leave off the closing tag unless it&#039;s required. </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Everett</title>
		<link>http://tiffanybbrown.com/2008/05/06/debugging-tip-disallowed-key-character-error-in-codeigniter/comment-page-1/#comment-93217</link>
		<dc:creator>Everett</dc:creator>
		<pubDate>Mon, 02 Nov 2009 17:16:00 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1285#comment-93217</guid>
		<description>It&#039;s not just CodeIgniter... this is a &quot;feature&quot; of PHP.  It&#039;s best to leave off the closing tag unless it&#039;s required.</description>
		<content:encoded><![CDATA[<p>It&#039;s not just CodeIgniter&#8230; this is a &quot;feature&quot; of PHP.  It&#039;s best to leave off the closing tag unless it&#039;s required.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tiffany</title>
		<link>http://tiffanybbrown.com/2008/05/06/debugging-tip-disallowed-key-character-error-in-codeigniter/comment-page-1/#comment-90860</link>
		<dc:creator>tiffany</dc:creator>
		<pubDate>Tue, 13 May 2008 14:35:16 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1285#comment-90860</guid>
		<description>@ben: but but... i like the ?&gt;. actually, if i unlearn the habit, i&#039;d probably wind up with the converse problem. i&#039;m weird like that. 

still, dropping the ?&gt; is a good way to prevent the problem. thanks for reiterating the point.

@markus: in CI, each key name in the data array becomes a variable. $data[&#039;foo&#039;] in your controller becomes $foo in your view. using a foreach loop seems unnecessary to me, unless you&#039;re returning multiple database rows.</description>
		<content:encoded><![CDATA[<p>@ben: but but&#8230; i like the ?>. actually, if i unlearn the habit, i&#8217;d probably wind up with the converse problem. i&#8217;m weird like that. </p>
<p>still, dropping the ?> is a good way to prevent the problem. thanks for reiterating the point.</p>
<p>@markus: in CI, each key name in the data array becomes a variable. $data['foo'] in your controller becomes $foo in your view. using a foreach loop seems unnecessary to me, unless you&#8217;re returning multiple database rows.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tiffany</title>
		<link>http://tiffanybbrown.com/2008/05/06/debugging-tip-disallowed-key-character-error-in-codeigniter/comment-page-1/#comment-93216</link>
		<dc:creator>tiffany</dc:creator>
		<pubDate>Tue, 13 May 2008 14:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1285#comment-93216</guid>
		<description>@ben: but but... i like the ?&gt;. actually, if i unlearn the habit, i&#039;d probably wind up with the converse problem. i&#039;m weird like that. 

still, dropping the ?&gt; is a good way to prevent the problem. thanks for reiterating the point.

@markus: in CI, each key name in the data array becomes a variable. $data[&#039;foo&#039;] in your controller becomes $foo in your view. using a foreach loop seems unnecessary to me, unless you&#039;re returning multiple database rows.</description>
		<content:encoded><![CDATA[<p>@ben: but but&#8230; i like the ?&gt;. actually, if i unlearn the habit, i&#8217;d probably wind up with the converse problem. i&#8217;m weird like that. </p>
<p>still, dropping the ?&gt; is a good way to prevent the problem. thanks for reiterating the point.</p>
<p>@markus: in CI, each key name in the data array becomes a variable. $data['foo'] in your controller becomes $foo in your view. using a foreach loop seems unnecessary to me, unless you&#8217;re returning multiple database rows.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Ramsey</title>
		<link>http://tiffanybbrown.com/2008/05/06/debugging-tip-disallowed-key-character-error-in-codeigniter/comment-page-1/#comment-90858</link>
		<dc:creator>Ben Ramsey</dc:creator>
		<pubDate>Mon, 12 May 2008 04:42:37 +0000</pubDate>
		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1285#comment-90858</guid>
		<description>Some others have already mentioned that the ?&gt; closing tag is not required, but I wanted to reiterate the point. In fact, as you have found, it can cause errors and unintended effects, particularly in library code (such as in a framework), because stray characters (line breaks, spaces, etc.) after the ?&gt; are echoed immediately. Thus, any code that sets a header later in the code (i.e. cookies, etc.) ends up being broken because headers cannot be set after content has been sent (echoed) to the client.

For this reason, it&#039;s a good practice to leave out the trailing ?&gt; closing tag when writing anything that&#039;s not specifically a view/template.

You can get around this, though, by turning on output buffering. :-)</description>
		<content:encoded><![CDATA[<p>Some others have already mentioned that the ?&gt; closing tag is not required, but I wanted to reiterate the point. In fact, as you have found, it can cause errors and unintended effects, particularly in library code (such as in a framework), because stray characters (line breaks, spaces, etc.) after the ?&gt; are echoed immediately. Thus, any code that sets a header later in the code (i.e. cookies, etc.) ends up being broken because headers cannot be set after content has been sent (echoed) to the client.</p>
<p>For this reason, it&#8217;s a good practice to leave out the trailing ?&gt; closing tag when writing anything that&#8217;s not specifically a view/template.</p>
<p>You can get around this, though, by turning on output buffering. <img src='http://tiffanybbrown.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

