S
S
SimBioT192017-04-18 00:19:06
PHP
SimBioT19, 2017-04-18 00:19:06

Why is not all data coming?

Hey!
Post requests are sent from the client to the server and they are quite large (there is a lot of data in the plan, but not the size).

With Ajax, I send only the id , and data parameters , but the last one is a heavily nested array containing other arrays.
In general, there are more than 1000 elements, and this is where the problem begins - for some reason, the id stopped coming to the server .
I look in the console - it is sent, on the server it is equal to null. And all this, as it turned out, is due to the length of the array, because if it is reduced, then the id parameter comes. The array looks something like this:$_POST['id']



data[0][id]=1
data[0][name]=Название
data[0][deleted]=false
data[0][collapsed]=true
data[0][messages][0][replies][0][body]=Сообщение
data[0][messages][0][replies][0][title]=false
...


And an even bigger problem is that, just like the id parameter , all elements of the array, except for index 0, stopped coming.

That is, A with index 1 is narrower . How can this happen? The size of POST requests (such small ones) is essentially unlimited. Could it be related to Nginx settings? var_dump($_POST['data'][0]); // возвращает данные
var_dump($_POST['data'][1]); // null


Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
KTF, 2017-04-18
@KTF

Try increasing the max_input_vars setting in php.ini to 10000 or more.

E
Egor Shustrov, 2017-04-18
@HeavenlyWaltz

Try to send your data partially, split the array into 2-4 parts, and send in batches. as already mentioned above, there may be restrictions, and I think they are there for a reason.

M
mistergonza, 2017-04-18
@mistergonza

In php.ini parameter max_input_nesting_level. It just for nesting depth also answers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question