PHP Fatal error allowed memory size exhausted
Your code looks fine. Check if some function is getting called repeatedly.
You could use
ini_set('memory_limit', '-1');
as a temporary solution. or just increase the memory_limit
Chceck you php.ini
file. If it is in the below form,
memory_limit=8G
Change that in the form of MB
memory_limit=8192M
You can also do it in your code like
ini_set('memory_limit', '8192M');
Put this line on your codeigniter's index.php. So it will be affected for whole project.
ini_set('memory_limit', '-1');
Note: This is just a quick fix. This bug has not been resolved in php itself.
If anybody else has this problem:
Make sure your memory size in php.ini has an M after the number.
I had 512 in there....when I changed it to 512M .....no more problem.
z