Krylus
-
Posts
2 -
Joined
-
Last visited
Posts posted by Krylus
-
-
Hi,
I have very little experience with php programming. I have a rather big array i want to convert to json using json_encode
echo json_encode($data_array);
However, I am getting the following error:
<b>Fatal error</b>: Allowed memory size of 67108864 bytes exhausted (tried to allocate 4194384 bytes)
I assume the array i am trying to convert is too big for server to handle. Is there some way how I can accomplish this, perhaps iteratively?
Thanks for answer,
Krylus
json_encode exceeds allowed memory
in PHP Coding Help
Posted · Edited by Krylus
I tried increasing the memory limit as suggested by QuickOldCar earlier, however this does not work on the server where my data is stored (I suppose it is disabled?).
Nevertheless, requinix’s solution with building JSON by myself worked. Guess I should have thought of that . Thank you!