Asked 2 years ago
11 Feb 2022
Views 1214
pratik

pratik posted

CodeIgniter PHP Fatal Error: Allowed Memory Size of 134217728 bytes Exhausted

I am trying to call some curl calls to get some API , and API has heavy data to get. so somehow other pages are working well but in that API getting page at Codeigniter
shabi

shabi
answered Feb 11 '22 00:00

put following code in __construct() function of controller after parent::__construct();


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

shyam

shyam
answered Feb 11 '22 00:00

increase memory limit from 128MB to 256M :
put php code at firstline of code at php file


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


or go to php.ini and set the memory limit to 256M
Post Answer