Welcome Guest, Not a member yet? Register   Sign In
Fatal error: Allowed memory size
#1

[eluser]Unknown[/eluser]
I'm new to CI and have created a very simple first application which needs to display a list from a small MySql table (466 records). I get this error:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 523800 bytes) in /home/deb42496n2/domains/ravenskeep.nl/public_html/framework/application/config/autoload.php on line 1122

Autoload.php doesn't have 1122 lines so I can't check in the code what it could be. I know this normally error normally is used for uploading file size settings in the php.ini. I don't upload anything however and I have more applications running in this server (ISP) without any problems. Even a Joomla with a Gallery.

Can anyone point me in the right direction? What could it be? A loop in my application?

Thx,
#2

[eluser]Unknown[/eluser]
Problem solved. Don't know exactly what the problem was but it had something to do with the naming between the controller and model files and classes. I think the database query returned an empty result and that can't be parsed into an array.
#3

[eluser]smilie[/eluser]
"Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 523800 bytes)"

This is PHP error (not CodeIgniter related).
It basically means, that to execute your code, PHP needed more then allowed 64 MB memory.
Mostly, this comes from 'bad' code, like too many loops (while, if > else or foreach); but also possible cause could be that you try to store very large DB result into PHP and then handle that data.

Best practice is to trace which part of your code creates problem and to solve problem. Other (quick & dirty) solution is to increase maximum memory PHP may consume - but this could eventually lead to complete server crash.

Cheers,
Smilie




Theme © iAndrew 2016 - Forum software by © MyBB