I have a very large html form (containing a table with rows containing several inputs) that I need to send to a PHP script through a POST request. The problem is that some values ββdo not pass and are absent in PHP $ _POST superglobal.
I checked (using the Firebug extension) that the values ββare actually sent to the server by the browser.
$ _ POST is populated, but some values ββare simply missing.
I checked what is a raw request using:
$raw_post = file_get_contents('php://input');
and the returned string matters. They simply are not parsed into the $ _POST array. The strange thing I noticed is that the input php: // values ββare truncated after some length, and the rest of the line does not go into $ _POST.
I thought about post_max_size and memory_limit and set them to large values:
memory_limit = 256M post_max_size = 150M
but according to php documentation $ _POST should not contain any values ββif request made is bigger than post_max_size.
Due to the large size of the form and the request, I cannot post it here, but I can send a php script, I used to debug the problem:
var_dump($file = file_get_contents('php://input')); var_dump($_POST); //... then i parsed the $file
Server Version: Apache / 2.2.9 (Debian)
PHP version: PHP 5.3.2-0.dotdeb.2
Can I explain the reason for such strange behavior of PHP, and what should I do (change php settings, code?) To use the $ _POST array when processing the form?
EDIT: to be clear: not only the values ββare missing. $ _POST also does not contain these keys.
ex fragment of the original message:
t_dodparam%5B198%5D=&t_dodparam2%5B198%5D=&t_kolejnosc%5B198%5D=199&n_indeks=201&n_wartosc=testtesttest
The key "t_dodparam" is in the column and has the key 198. The remaining parameters are absent (ex t_dodparam2 is in the message, but it does not have such a key as 198, and there is no such key as n_wartosc in $ _POST)