Reputation: 11
I've custom library
class Test extends CI_Controller {
public function __construct(){
parent::__construct();
}
public function abc(){
//some code
}
}
When i add this library to autoload, get the following error
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 261904 bytes) in C:\xampp\htdocs...\system\core\Loader.php on line 495
Upvotes: 0
Views: 1611
Reputation: 398
Either you have a loop in that library or just an operation that allocates loads of memory, like inserting tonnes of data into an array. If you cannot optimize the operations in you library you might need to increase the allowed memory size in php
ini_set('memory_limit', '512M');
Upvotes: 0
Reputation: 87
You extend the CI_Controller
In you're library you don't extend anything. Except if you want to edit or change a other Library (helper, etc)
http://ellislab.com/codeigniter/user-guide/general/creating_libraries.html
Upvotes: 1