title: $_POST is empty in php
body: <p>I have gone through all the responses in <a href="https://stackoverflow.com/questions/1282909/php-post-array-empty-upon-form-submission">this post</a><br>
  print_r($_POST); ===> returns empty array<br>
  print_r($_SERVER); </p>
  
  <pre><code>Array ( [HTTP_HOST] =&gt; localhost 
          [HTTP_ACCEPT] =&gt; */* 
          **[HTTP__CONTENT_TYPE]** =&gt; application/json; charset=UTF-8" 
          [CONTENT_LENGTH] =&gt; 942
          **[CONTENT_TYPE]** =&gt; application/x-www-form-urlencoded 
          [PATH] =&gt; /usr/local/bin:/usr/bin:/bin 
          [SERVER_SIGNATURE] =&gt; Apache/2.2.14 (Ubuntu) Server at localhost Port 80
          [SERVER_SOFTWARE] =&gt; Apache/2.2.14 (Ubuntu) 
          [SERVER_NAME] =&gt; localhost 
          [SERVER_ADDR] =&gt; 127.0.0.1 
          [SERVER_PORT] =&gt; 80 
          [REMOTE_ADDR] =&gt; 127.0.0.1 
          [DOCUMENT_ROOT] =&gt; /var/www 
          [SERVER_ADMIN] =&gt; webmaster@localhost 
          [SCRIPT_FILENAME] =&gt; /var/www/slocation.php 
          [REMOTE_PORT] =&gt; 50657 
          [GATEWAY_INTERFACE] =&gt; CGI/1.1 
          [SERVER_PROTOCOL] =&gt; HTTP/1.1 
          [REQUEST_METHOD] =&gt; POST 
          [QUERY_STRING] =&gt; 
          [REQUEST_URI] =&gt; /slocation.php 
          [SCRIPT_NAME] =&gt; /slocation.php 
          [PHP_SELF] =&gt; /slocation.php 
          [REQUEST_TIME] =&gt; 1288466907 
      )
  </code></pre>
  
  <p>What's the difference between HTTP__CONTENT_TYPE and CONTENT_TYPE?</p>
  
  <p>print_r($HTTP_RAW_POST_DATA); ==> returns correct data posted<br>
  file_get_contents('php://input'); ======> returns correct data.</p>
  
  <p>Only $_POST fails.</p>
  
  <p>This is my curl command</p>
  
  <pre><code>$url = "http://localhost/slocation.php";
  $ch = curl_init($url);
  curl_setopt($ch, CURLOPT_HEADER, 1);
  curl_setopt ($ch, CURLOPT_HTTPHEADER, array('"Content-type: application/json; charset=UTF-8"'));
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
  $result = curl_exec($ch);
  </code></pre>
  
  <p>UPDATE::::::::::::::::::::::::::::::::::::::::::::::::::<br>
  I found a master <a href="http://www.devnetwork.net/viewtopic.php?f=1&amp;t=123208&amp;start=0&amp;sid=e4765fb94fb809a8d8921590823c6bac" rel="nofollow noreferrer">here</a></p>