Jump to:

23007 Posts in 11866 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » Fatal PHP Error

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

Page: 1
Go to End
Author Topic: 374 Views
  • Stef87
    Avatar
    Community Member
    66 Posts

    Fatal PHP Error Link to this post

    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.

  • swaiba
    Avatar
    Forum Moderator
    1769 Posts

    Re: Fatal PHP Error Link to this post

    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)

  • Stef87
    Avatar
    Community Member
    66 Posts

    Re: Fatal PHP Error Link to this post

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

    374 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.