Jump to:

22992 Posts in 11842 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » PHP memory limit issue

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: 1616 Views
  • dkm
    Avatar
    Community Member
    4 Posts

    PHP memory limit issue Link to this post

    I know the topic has been beatin' like a dead horse, but I've run into an problem on a clients site. The failure happens when trying to access the CMS (admin section). Here's the error from the Apache error.log:

    [Wed Apr 29 17:17:43 2009] [error] [client 68.183.195.206] PHP Fatal error: Out of memory (allocated 16252928) (tried to allocate 46 bytes) in /usr/local/www/vhosts/ropepartner.com/httpdocs/sapphire/forms/OptionsetField.php on line 70

    Now, the hosting provider claims the PHP memory limit is set to 128M. As a check I made phpinfo() call in a script and phpinfo states the memory_limit is set to 128M. From the error, though, it looks like PHP is failing at around 16M.

    Any ideas?

  • rbquirke
    Avatar
    Community Member
    70 Posts

    Re: PHP memory limit issue Link to this post

    See if you can set it explicitly in the .htaccess with this line:
    php_value memory_limit 128M

    - may or may not work depending on the hosting provider's settings

  • dkm
    Avatar
    Community Member
    4 Posts

    Re: PHP memory limit issue Link to this post

    Thanks rbquirke,

    Yeah, I've tried explicitly set the memory limit to 128M in both .htaccess and sapphire/main.php but it hasn't helped.

  • Double-A-Ron
    Avatar
    Community Member
    603 Posts

    Re: PHP memory limit issue Link to this post

    That's a weird one. I suppose you've cleared your browser cache?

    Who's the host?

  • dkm
    Avatar
    Community Member
    4 Posts

    Re: PHP memory limit issue Link to this post

    Yep, tried that too. I only thing I can come up with is that it may be and issue with Apache and the RLimitMEM directive being set to 16 megs. I think PHP is running under FastCGI (I'm not sure yet, I haven't heard back from the hosting provider) and if so I believe that the memory limit set by RLimitMEM kicks in and will override any value set in php.ini or elsewhere.

    The hosting provider is just a local one here in town. We have two other clients running SS on their hosts without any issues.

    1616 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.