POST to web service fails while GET succeeded: PHP
<p>I have implemented a web service in PHP. This service takes name/value pairs as input and returns JSON encoded strings. </p>

<p>Everything was working as expected on my local apache web servers running on mac-osx and windows 7. However, after hosting my PHP scripts on this linux based web service provider, my POST requests to the service are failing.</p>

<p>By backend PHP script which fails is as follows:</p>

<pre><code>if (session_id() == "") {
    session_start();
}

ob_start();

$command = isset($_REQUEST["Command"]) ? $_REQUEST["Command"] : "";
if ($command == "") {
    echo("Handler Not Found: ");
    print_r($_REQUEST);
}
</code></pre>

<p>The output from a POST request to the url with <code>Command=do_foo</code> is always <code>Handler Not Found:</code>. It is as if the web service never receives any of the parameters I send. The value of <code>$_REQUEST</code> is printed as:</p>

<pre><code>[PHPSESSID] =&gt; db0af76fe8028e70dc96f816d0dbe927 
</code></pre>

<p>If I change the invocation method to GET everything works as expected. What am I missing?</p>

<p>PS: I'm calling this web service in an Android app using <code>apache.http.client.methods.HttpGet</code> and <code>`apache.http.client.methods.HttpGet</code>. I have verified that the POST fails even if I send the POST request through the <a href="https://addons.mozilla.org/en-US/firefox/addon/poster/" rel="nofollow">FireFox add-on Poster</a> </p>

<p>EDIT: </p>

<ol>
<li><p>I have the same problem if I use the <code>$_POST</code> super global.  </p></li>
<li><p>I cannot ssh into my hosting server, but CPANEL is showing me that
    <code>register_globals=off</code>. I don't know if that can create problems.</p></li>
</ol>
