Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Fatal PHP Error


3 Posts   434 Views


22 August 2012 at 4:00am (Last edited: 22 August 2012 4:16am), Community Member, 66 Posts

I keep getting this error when I try to create a new page in my CMS. I have absolutely no clue what is causing it. Any help would be much appreciated.

[21-Aug-2012 15:54:28 UTC] PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 2238 bytes) in /Applications/MAMP/htdocs/SilverStripe/sapphire/core/Convert.php on line 106

I have seen some threads on this that say to increase the memory limit in php.ini but what I want to know is what caused this and is there a way to fix it without having to continually allocate more memory?

Thanks in advance.


22 August 2012 at 5:15am Forum Moderator, 1796 Posts

you could check whether you have

* php 5.3
* garbage collection enabled

Alternatively look at the code in more detail - there memory is running out on that exact line of code - but it is likely that it is something higher in the stack trace that is the real culprit (e.g. a loop doing loads of stuff including calling this convert)


22 August 2012 at 7:58pm Community Member, 66 Posts

Thanks swaiba. You were right. I went back through my code and there was a loop doing exactly that. Thanks for the help.