简体   繁体   中英

PHPExcel Allowed memory size

How to fix this error in PHPExcel CodeIgniter?

Fatal error:

Allowed memory size of 134217728 bytes exhausted (tried to allocate 131072 bytes) in /sites/apps/seller/www/application/libraries/Excel/PHPExcel/CachedObjectStorage/CacheBase.php on line 173

There are two ways to solve this error.

  1. Put the below code into your function at the beginning of the code.

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

  1. You can find the php.ini file in your system and find the memory_limit and change its value and restart your server .

Go to your XAMMP location and open PHP folder find php.init file and changes this

; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
  memory_limit=128M
  to 
  memory_limit=150M

I hope this help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM