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, Ed, biapar, Willr, Ingo, swaiba

Fatal PHP Error

Go to End

3 Posts   677 Views


Community Member, 66 Posts

22 August 2012 at 4:00am

Edited: 22/08/2012 4:16am

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.


Forum Moderator, 1899 Posts

22 August 2012 at 5:15am

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)


Community Member, 66 Posts

22 August 2012 at 7:58pm

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