I'm trying to export a large mysql table (~25000 rows) to excel using phpexcel. But when I run the query to pull the data from the database, I get the following error:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 64 bytes)
I would assume I should change my memory_limit
value but I don't know what a reasonable value for this should be and I know that something like:
ini_set('memory_limit', -1);
is not a good idea...
What's the best approach to this situation?