I'm loading a large amount of data into a Node array. Then, I'm passing that data to a PHP page like this:
const rows = res.data.values;
axios.post('./template.php', qs.stringify({rows}))
.then((res) => {
console.log(res.data);
fs.writeFileSync('test.php', res.data, 'utf-8');
})
Then, when I get to test.php, the $_POST variable is only the first 100 entries of my array I just passed.
I noticed when debugging and using console.log() to print the same array, I was getting something that said "... 19 more items". I was able to resolve that by calling this:
util.inspect.defaultOptions.maxArrayLength = null;
At the top of my function. This worked great to stop the "... 19 more items" and now the full array displays with console.log(), however, it seems to have had no effect on my POST.
I'm stumped as to what I'm missing here -- does anyone know why my array is getting truncated when doing the POST? Thanks!