title: php - got no $_POST values with multipart/form-data
body: <p>The question is easy. I am requesting:</p>
  
  <pre><code>POST /api/?user=auth HTTP/1.1 Content-Length: 437 Content-Type: multipart/form-data; boundary=tYhL_Uv6shSE9A9DHwvtJvXb0NPSLNMsdg; charset=UTF-8 Host: 192.168.0.10:8888 Connection: Keep-Alive User-Agent: Apache-HttpClient/UNAVAILABLE (java 1.4)
  
  --tYhL_Uv6shSE9A9DHwvtJvXb0NPSLNMsdg Content-Disposition: form-data; name="token"
  
  KJjhyuJHYsadfU78
  --tYhL_Uv6shSE9A9DHwvtJvXb0NPSLNMsdg Content-Disposition: form-data; name="api_login"
  
  9053494481
  --tYhL_Uv6shSE9A9DHwvtJvXb0NPSLNMsdg Content-Disposition: form-data; name="api_password"
  
  8013468v30
  --tYhL_Uv6shSE9A9DHwvtJvXb0NPSLNMsdg Content-Disposition: form-data; name="api_terms"
  
  no
  --tYhL_Uv6shSE9A9DHwvtJvXb0NPSLNMsdg--
  </code></pre>
  
  <p>and receive $_POST === array() in PHP.</p>
  
  <pre><code>PHP 5.3.3 (cli) (built: Dec 11 2013 03:29:57) 
  Copyright (c) 1997-2010 The PHP Group
  Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
      with eAccelerator v1.0-dev, Copyright (c) 2004-2012 eAccelerator, by eAccelerator
  </code></pre>
  
  <p>And</p>
  
  <pre><code>Server version: Apache/2.2.15 (Unix)
  </code></pre>
  
  <p>Checked the server for rewrite redirects that can lose data - found none.
  Please, help.</p>
  
  <p><strong>RESOLVED</strong>: I used apache library to send multipart request. It produced header:</p>
  
  <pre><code>Content-Type: multipart/form-data; boundary=tYhL_Uv6shSE9A9DHwvtJvXb0NPSLNMsdg; charset=UTF-8
  </code></pre>
  
  <p>When I remove encoding settings, it changed to:</p>
  
  <pre><code>Content-Type: multipart/form-data; boundary=tYhL_Uv6shSE9A9DHwvtJvXb0NPSLNMsdg
  </code></pre>
  
  <p>And now all works smooth.</p>