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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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

PHP memory limit issue


Go to End


5 Posts   2468 Views

Avatar
dkm

Community Member, 4 Posts

30 April 2009 at 12:53pm

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?

Avatar
rbquirke

Community Member, 70 Posts

30 April 2009 at 2:36pm

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

Avatar
dkm

Community Member, 4 Posts

30 April 2009 at 3:34pm

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.

Avatar
Double-A-Ron

Community Member, 607 Posts

30 April 2009 at 10:03pm

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

Who's the host?

Avatar
dkm

Community Member, 4 Posts

1 May 2009 at 4:41am

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.