Comrades, I come here with a little problem.
It happens that I have a simple web application that only receives certain parameters and I throw a report in excel with the detailed information based on these parameters. The query is already finished and throws a large amount of data (It is information from two tables in which one has 25 million records and another has 65 thousand) and this query is already indexed and in MySQL answers me in maximum 1 minute. The problem here is that when I try to generate this report in Excel it throws me the error of:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 54 bytes)
I researched on the internet and saw that the solutions given were to enter the php.ini and modify the memory_limit or to 512 or -1, also add a small line in the code, which is:
ini_set('memory_limit', '-1');
Do this and yes..the error stopped..but now the page goes down while the process is done. I do not know if maybe someone else has some other alternative or the ones they used were the only ones possible. I would greatly appreciate the help given!
Pd: I use PHPExcel-1.8 to generate these Excel files.