-2

I am implementing getJSON and passing some data as an object:

$.getJSON('my/path', data);

One of the elements in data is longer --about 700 characters. If I log data to the console before getJSON is called, all elements are present. If I log data after it's been passed to the php function, the element with the longer data is missing. all other elements are present, including those found after the longer element.

I've played around with it using other variables and values, and it's pretty clear that somewhere around 500 characters for the element value, the entire element is lost.

Is there a php config setting that would impact this? I have similar function usage on other servers that are not impacted by any limitation. So it would seem to be something set in the environment.

lcdservices
  • 841
  • 1
  • 9
  • 20
  • Take a look at http://stackoverflow.com/questions/2915366/getjson-not-working-for-large-data and http://stackoverflow.com/questions/1151987/can-i-set-an-unlimited-length-for-maxjsonlength-in-web-config – Regent Jul 15 '14 at 03:40

1 Answers1

0

The problem was with the php setting: suhosin.get.max_value_length It was set to 512, which did not accommodate the length of the element. I increased that value and it worked as expected.

lcdservices
  • 841
  • 1
  • 9
  • 20