0

I'm sending a large form over to server.

Now watching the developer tools i see : enter image description here

As in 560 rows has been sent, but when I print_r($_POST) I see only 500 rows.

Now I have tried setting :

ini_set('memory_limit', '1024M');

And I have post_max_size set to 8M and increasing it didn't seem to work either. Also tried setting max_input_vars to 1000000 but same result.

I am submiting the form via ajax using jQuery. I'm getting same results with Chrome and FF

Any idea what may cause this?

This is the client side script :

    $.ajax({
    type: 'POST',
    dataType: 'json',
    data: { data : fullTableToJson($('#charges_table').get(0)),title : "sometitle"},
    url: 'url with get parameters',
    success : function(result) {    

    }
});

fullTableToJson is a method that turns html table to json, it works as i've been using it in many places in my code.

Could it be related to the fact my url contains GET parameters?

BenMorel
  • 34,448
  • 50
  • 182
  • 322
eric.itzhak
  • 15,752
  • 26
  • 89
  • 142
  • What's the client side script ? – maan81 Feb 18 '13 at 10:51
  • if you think post_max_size is the culprit here and not able to increase it means you have to check your server.is it shared hosting? because shared hosting may have cap on max sizes.http://stackoverflow.com/questions/7658193/is-there-any-size-limitation-for-ajax-post – zamil Feb 18 '13 at 10:59
  • It's not it's my server and no such blocking exist, in no way i don't believe an array of 560x6 should reach 8M – eric.itzhak Feb 18 '13 at 11:00

1 Answers1

3

Well, the problem was I had max_input_vars set to 3000, and I've tried sending 560x6 items which is 3360 items, which explains the leap.

Now i've tried changing it with

ini_set('max_input_vars', 999999);

And assumed it didn't solved it, but checking phpinfo(); I saw that it hasn't changed.

Thus changed in php.ini file and it worked.

eric.itzhak
  • 15,752
  • 26
  • 89
  • 142