Dimas Adi Andrea
Dimas Adi Andrea

Reputation: 453

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

Upvotes: 1

Views: 16591

Answers (2)

Mcfaith
Mcfaith

Reputation: 275

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.

Upvotes: 0

Raj Jagani
Raj Jagani

Reputation: 758

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.

Upvotes: 1

Related Questions