<?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: PHP $_POST array empty although php://input and raw post data is available?</title>
	<atom:link href="http://getluky.net/2009/02/24/php-_post-array-empty-although-phpinput-and-raw-post-data-is-available/feed/" rel="self" type="application/rss+xml" />
	<link>http://getluky.net/2009/02/24/php-_post-array-empty-although-phpinput-and-raw-post-data-is-available/</link>
	<description></description>
	<lastBuildDate>Mon, 09 Jan 2012 10:13:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Marcos G.</title>
		<link>http://getluky.net/2009/02/24/php-_post-array-empty-although-phpinput-and-raw-post-data-is-available/comment-page-1/#comment-311818</link>
		<dc:creator>Marcos G.</dc:creator>
		<pubDate>Sat, 29 Oct 2011 22:48:02 +0000</pubDate>
		<guid isPermaLink="false">http://getluky.net/?p=425#comment-311818</guid>
		<description>&lt;p&gt;THANKS A LOT.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>THANKS A LOT.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Massam</title>
		<link>http://getluky.net/2009/02/24/php-_post-array-empty-although-phpinput-and-raw-post-data-is-available/comment-page-1/#comment-311747</link>
		<dc:creator>Massam</dc:creator>
		<pubDate>Fri, 08 Jul 2011 11:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://getluky.net/?p=425#comment-311747</guid>
		<description>&lt;p&gt;Hey,&lt;/p&gt;

&lt;p&gt;I have the same problem with POST method, tried all options in this thread and other forums too, but could not get it work.&lt;/p&gt;

&lt;p&gt;Here is my code:
&lt;?php&lt;/p&gt;

&lt;p&gt;$data = file&lt;em&gt;get&lt;/em&gt;contents(&#039;php://input&#039;);
print(&quot;Data is : &quot;);
print_r($data);&lt;/p&gt;

&lt;p&gt;print &quot;CONTENT&lt;em&gt;TYPE: &quot; . $&lt;/em&gt;SERVER[&#039;CONTENT&lt;em&gt;TYPE&#039;] . &quot;&quot;;
$data = file&lt;/em&gt;get&lt;em&gt;contents(&#039;php://input&#039;);
print &quot;DATA: &lt;pre&gt;&quot;;
var&lt;/em&gt;dump($data);
var&lt;em&gt;dump($&lt;/em&gt;POST);
print &quot;&lt;/pre&gt;&quot;;
?&gt;

    
    
&lt;/p&gt;

&lt;p&gt;The output is:
Data is :&lt;/p&gt;

&lt;p&gt;CONTENT_TYPE:
DATA:&lt;/p&gt;

&lt;p&gt;string(0) &quot;&quot;
array(0) {
}&lt;/p&gt;

&lt;p&gt;Can anybody help me on this?&lt;/p&gt;

&lt;p&gt;Massam&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hey,</p>

<p>I have the same problem with POST method, tried all options in this thread and other forums too, but could not get it work.</p>

<p>Here is my code:
&lt;?php</p>

<p>$data = file<em>get</em>contents(&#8216;php://input&#8217;);
print(&#8220;Data is : &#8220;);
print_r($data);</p>

<p>print &#8220;CONTENT<em>TYPE: &#8221; . $</em>SERVER['CONTENT<em>TYPE'] . &#8220;&#8221;;
$data = file</em>get<em>contents(&#8216;php://input&#8217;);
print &#8220;DATA: <pre>";
var</pre></em>dump($data);
var<em>dump($</em>POST);
print "&#8220;;
?&gt;

    
    
</p>

<p>The output is:
Data is :</p>

<p>CONTENT_TYPE:
DATA:</p>

<p>string(0) &#8220;&#8221;
array(0) {
}</p>

<p>Can anybody help me on this?</p>

<p>Massam</p>]]></content:encoded>
	</item>
	<item>
		<title>By: ukraine</title>
		<link>http://getluky.net/2009/02/24/php-_post-array-empty-although-phpinput-and-raw-post-data-is-available/comment-page-1/#comment-311725</link>
		<dc:creator>ukraine</dc:creator>
		<pubDate>Mon, 30 May 2011 10:39:59 +0000</pubDate>
		<guid isPermaLink="false">http://getluky.net/?p=425#comment-311725</guid>
		<description>&lt;p&gt;AWESOME, SAVED ME DAYS! HOPE YOUR PAGE GETS MORE OUTER LINKS!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>AWESOME, SAVED ME DAYS! HOPE YOUR PAGE GETS MORE OUTER LINKS!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Pep</title>
		<link>http://getluky.net/2009/02/24/php-_post-array-empty-although-phpinput-and-raw-post-data-is-available/comment-page-1/#comment-311627</link>
		<dc:creator>Pep</dc:creator>
		<pubDate>Wed, 06 Apr 2011 08:18:39 +0000</pubDate>
		<guid isPermaLink="false">http://getluky.net/?p=425#comment-311627</guid>
		<description>&lt;p&gt;More than 2 years later but still a very helpful post! Thanks.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>More than 2 years later but still a very helpful post! Thanks.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Vincent</title>
		<link>http://getluky.net/2009/02/24/php-_post-array-empty-although-phpinput-and-raw-post-data-is-available/comment-page-1/#comment-311613</link>
		<dc:creator>Vincent</dc:creator>
		<pubDate>Wed, 09 Mar 2011 20:56:32 +0000</pubDate>
		<guid isPermaLink="false">http://getluky.net/?p=425#comment-311613</guid>
		<description>&lt;p&gt;&lt;a href=&quot;#comment-311592&quot; rel=&quot;nofollow&quot;&gt;@Luis&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Hi, I just found my solution on http://bugs.php.net/bug.php?id=22427
In my case, I just disabled the suhosin extension.
Hope this helps.&lt;/p&gt;

&lt;p&gt;[2007-10-30 10:02 UTC] sbauer at gjl-network dot net&lt;/p&gt;

&lt;p&gt;While experiencing this issue, too we found that the cause of this problem was the suhosin patch, wich was - by default - configured to have a max limit for the length of cookie, request, post, get and session vars. E.g. for POST this looks like:&lt;/p&gt;

&lt;p&gt;suhosin.post.max&lt;em&gt;array&lt;/em&gt;depth    100 100
suhosin.post.max&lt;em&gt;array&lt;/em&gt;index&lt;em&gt;length 64  64
suhosin.post.max&lt;/em&gt;name&lt;em&gt;length    64  64
suhosin.post.max&lt;/em&gt;totalname&lt;em&gt;length   256 256
suhosin.post.max&lt;/em&gt;value&lt;em&gt;length   65000   65000
suhosin.post.max&lt;/em&gt;vars   200 200&lt;/p&gt;

&lt;p&gt;Those derivatives needs to be set to a adequate higher number. E.g. in our case, the problem was, that our POST data was too long (as this seems to be the case for a lot of you here).&lt;/p&gt;

&lt;p&gt;So I suggest to check your php.ini or (according to your distribution there often is a suhosin.ini) and correct the above values or set them to 0 to disable it. If those derivatives are not set, default values will be used.
You need to check / add:
suhosin.post.max&lt;em&gt;....
suhosin.request.max&lt;/em&gt;...
suhosin.get.max&lt;em&gt;...
suhosin.session.max&lt;/em&gt;...
suhosin.cookie.max_...&lt;/p&gt;

&lt;p&gt;Refer to your phpinfo() where these values should be listed!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p><a href="#comment-311592" rel="nofollow">@Luis</a> </p>

<p>Hi, I just found my solution on <a href="http://bugs.php.net/bug.php?id=22427" rel="nofollow">http://bugs.php.net/bug.php?id=22427</a>
In my case, I just disabled the suhosin extension.
Hope this helps.</p>

<p>[2007-10-30 10:02 UTC] sbauer at gjl-network dot net</p>

<p>While experiencing this issue, too we found that the cause of this problem was the suhosin patch, wich was &#8211; by default &#8211; configured to have a max limit for the length of cookie, request, post, get and session vars. E.g. for POST this looks like:</p>

<p>suhosin.post.max<em>array</em>depth    100 100
suhosin.post.max<em>array</em>index<em>length 64  64
suhosin.post.max</em>name<em>length    64  64
suhosin.post.max</em>totalname<em>length   256 256
suhosin.post.max</em>value<em>length   65000   65000
suhosin.post.max</em>vars   200 200</p>

<p>Those derivatives needs to be set to a adequate higher number. E.g. in our case, the problem was, that our POST data was too long (as this seems to be the case for a lot of you here).</p>

<p>So I suggest to check your php.ini or (according to your distribution there often is a suhosin.ini) and correct the above values or set them to 0 to disable it. If those derivatives are not set, default values will be used.
You need to check / add:
suhosin.post.max<em>&#8230;.
suhosin.request.max</em>&#8230;
suhosin.get.max<em>&#8230;
suhosin.session.max</em>&#8230;
suhosin.cookie.max_&#8230;</p>

<p>Refer to your phpinfo() where these values should be listed!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Vincent</title>
		<link>http://getluky.net/2009/02/24/php-_post-array-empty-although-phpinput-and-raw-post-data-is-available/comment-page-1/#comment-311612</link>
		<dc:creator>Vincent</dc:creator>
		<pubDate>Wed, 09 Mar 2011 20:42:39 +0000</pubDate>
		<guid isPermaLink="false">http://getluky.net/?p=425#comment-311612</guid>
		<description>&lt;p&gt;&lt;a href=&quot;#comment-311592&quot; rel=&quot;nofollow&quot;&gt;@Luis&lt;/a&gt; 
I got the same issue right now... did you find a solution?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p><a href="#comment-311592" rel="nofollow">@Luis</a> 
I got the same issue right now&#8230; did you find a solution?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Luis</title>
		<link>http://getluky.net/2009/02/24/php-_post-array-empty-although-phpinput-and-raw-post-data-is-available/comment-page-1/#comment-311592</link>
		<dc:creator>Luis</dc:creator>
		<pubDate>Tue, 08 Feb 2011 13:43:50 +0000</pubDate>
		<guid isPermaLink="false">http://getluky.net/?p=425#comment-311592</guid>
		<description>&lt;p&gt;Hi, I know this post is almost a year old but I am hoping someone can help me. I have a similar problem: The contents of the $POST variable is incomplete. Outputting data via â€œphp://inputâ€ gives me the correct data, however vardumping the $POST variable shows a cutoff arrayâ€¦ Does anyone have an idea why this is happening? (BTW: postmax_size is correctly set and its value is 8M)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi, I know this post is almost a year old but I am hoping someone can help me. I have a similar problem: The contents of the $POST variable is incomplete. Outputting data via â€œphp://inputâ€ gives me the correct data, however vardumping the $POST variable shows a cutoff arrayâ€¦ Does anyone have an idea why this is happening? (BTW: postmax_size is correctly set and its value is 8M)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Hrvoje</title>
		<link>http://getluky.net/2009/02/24/php-_post-array-empty-although-phpinput-and-raw-post-data-is-available/comment-page-1/#comment-311510</link>
		<dc:creator>Hrvoje</dc:creator>
		<pubDate>Fri, 08 Oct 2010 11:03:13 +0000</pubDate>
		<guid isPermaLink="false">http://getluky.net/?p=425#comment-311510</guid>
		<description>&lt;p&gt;Hi guys,
I had a slightly different problem, however this post helped me to find a solution, and here it is.&lt;/p&gt;

&lt;p&gt;Your test example was working on my machine but my real form was still not submitting anything (I was submiting one form to another).
My php.ini was correctly configured so it had to be something else.&lt;/p&gt;

&lt;p&gt;One reason was that my submit button didn&#039;t have valid name attribute and value - it has to have one name attribute and its value has to be without underscores, for example like this: name=&quot;submit&quot; and not name=&quot;submit&lt;em&gt;btn&quot; (as described, for example, here: http://hr.php.net/manual/en/tutorial.forms.php, comment from arnel&lt;/em&gt;milan).&lt;/p&gt;

&lt;p&gt;The other reason was my login and password fields also not having name atributes, so I added them as well, also without underscores, for example, name=&quot;login&quot;, name=&quot;password&quot;.&lt;/p&gt;

&lt;p&gt;I guess I was used to use &quot;id&quot; attributes instead of &quot;name&quot; (since I am not really a php programmer, but a .net one).&lt;/p&gt;

&lt;p&gt;I hope this helps someone with similar problem.&lt;/p&gt;

&lt;p&gt;Cheers!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi guys,
I had a slightly different problem, however this post helped me to find a solution, and here it is.</p>

<p>Your test example was working on my machine but my real form was still not submitting anything (I was submiting one form to another).
My php.ini was correctly configured so it had to be something else.</p>

<p>One reason was that my submit button didn&#8217;t have valid name attribute and value &#8211; it has to have one name attribute and its value has to be without underscores, for example like this: name=&#8221;submit&#8221; and not name=&#8221;submit<em>btn&#8221; (as described, for example, here: <a href="http://hr.php.net/manual/en/tutorial.forms.php" rel="nofollow">http://hr.php.net/manual/en/tutorial.forms.php</a>, comment from arnel</em>milan).</p>

<p>The other reason was my login and password fields also not having name atributes, so I added them as well, also without underscores, for example, name=&#8221;login&#8221;, name=&#8221;password&#8221;.</p>

<p>I guess I was used to use &#8220;id&#8221; attributes instead of &#8220;name&#8221; (since I am not really a php programmer, but a .net one).</p>

<p>I hope this helps someone with similar problem.</p>

<p>Cheers!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: branio</title>
		<link>http://getluky.net/2009/02/24/php-_post-array-empty-although-phpinput-and-raw-post-data-is-available/comment-page-1/#comment-311322</link>
		<dc:creator>branio</dc:creator>
		<pubDate>Fri, 19 Feb 2010 13:18:52 +0000</pubDate>
		<guid isPermaLink="false">http://getluky.net/?p=425#comment-311322</guid>
		<description>&lt;p&gt;Cesar: Thanks! It solved my problem! I&#039;m happy now :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Cesar: Thanks! It solved my problem! I&#8217;m happy now <img src='http://getluky.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>]]></content:encoded>
	</item>
	<item>
		<title>By: getluky</title>
		<link>http://getluky.net/2009/02/24/php-_post-array-empty-although-phpinput-and-raw-post-data-is-available/comment-page-1/#comment-311234</link>
		<dc:creator>getluky</dc:creator>
		<pubDate>Fri, 04 Dec 2009 22:29:25 +0000</pubDate>
		<guid isPermaLink="false">http://getluky.net/?p=425#comment-311234</guid>
		<description>&lt;p&gt;Cesar: good point. This is the type of thing that Firebug is really handy for - if you can see via the Net panel that it&#039;s following a 302 redirect instead of sending a POST payload, you should be able to figure out what&#039;s going on pretty quickly.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Cesar: good point. This is the type of thing that Firebug is really handy for &#8211; if you can see via the Net panel that it&#8217;s following a 302 redirect instead of sending a POST payload, you should be able to figure out what&#8217;s going on pretty quickly.</p>]]></content:encoded>
	</item>
</channel>
</rss>

