JSON2CSV icon indicating copy to clipboard operation
JSON2CSV copied to clipboard

Error while trying to generate CSV

Open ChaitDevOps opened this issue 7 years ago • 3 comments

Hi,

Thank you for taking time to develop this code. However, i'm facing the below issue. Could you please advise?

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 158892139 bytes) in /home/centos/JSON2CSV-master/json2csv.class.php on line 15

ChaitDevOps avatar May 02 '18 20:05 ChaitDevOps

The JSON you're importing is probably very large. You need to increase the maximum memory allocation for PHP.

danmandle avatar May 02 '18 20:05 danmandle

@danmandle Thank you for this. I increased it and see the following errors.

PHP Warning:  array_keys() expects parameter 1 to be array, null given in /home/centos/JSON2CSV-master/json2csv.class.php on line 21
PHP Warning:  Invalid argument supplied for foreach() in /home/centos/JSON2CSV-master/json2csv.class.php on line 21
PHP Notice:  Undefined variable: keys in /home/centos/JSON2CSV-master/json2csv.class.php on line 24
PHP Warning:  array_merge(): Argument #1 is not an array in /home/centos/JSON2CSV-master/json2csv.class.php on line 24
PHP Warning:  Invalid argument supplied for foreach() in /home/centos/JSON2CSV-master/json2csv.class.php on line 42

ChaitDevOps avatar May 02 '18 20:05 ChaitDevOps

The problems are listed in your error messages. Your JSON is not in the format that is needed for this tool. I am available for hire if you need more assistance.

danmandle avatar May 02 '18 21:05 danmandle