Memory error when generating spreadsheet with Phpexcel

Asked

Viewed 279 times

0

I am having problems in generating Excel spreadsheets using Phpexcel when the number of records is too large the memory is insufficient to process the task, there is some way to improve the creation of this file through some cache system?

2 answers

1


I suggest you increase the memory in the php.ini. Mine is php7.0 in the Ubuntu 14, gets into /etc/php/7.0/apache2/php.ini

On line 389 I put it like this:

Memory_limit = 768M

To edit the php.ini I suggest you use the vi on Ubuntu.

  • This is one of the solutions, increase the use of PHP memory, but I would like another way to solve the problem, when hosting a system on a server I will probably have memory usage limitation.

0

It is possible to increase the memory in the php.ini file, located for example on my machine on:

 /usr/lib/php/7.0/php.ini-development

Or directly in php code

ini_set('memory_limit', '4096M');

Browser other questions tagged

You are not signed in. Login or sign up in order to post.