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

Memory Problems


Go to End
Reply

12 Posts   3309 Views

Avatar
ragunalth

29 September 2009 at 1:53am Community Member, 14 Posts

Hi please help with the following problem.

When do "Save and Publish" I get the following errors.

I have updated the sapphire/main.php file setting the memory up 128MB but nothing works.

Please advise the log file follows.

[28-Sep-2009 07:43:43] PHP Fatal error: Out of memory (allocated 48234496) (tried to allocate 4864 bytes) in /home/dhctrust/public_html/i/sapphire/core/Object.php(491) : eval()'d code on line 1
[28-Sep-2009 07:43:58] PHP Fatal error: Out of memory (allocated 48496640) (tried to allocate 140 bytes) in /home/dhctrust/public_html/i/sapphire/core/Object.php on line 491
[28-Sep-2009 07:44:12] PHP Fatal error: Out of memory (allocated 48496640) (tried to allocate 551 bytes) in /home/dhctrust/public_html/i/sapphire/core/HTTP.php on line 263
[28-Sep-2009 07:44:31] PHP Fatal error: Out of memory (allocated 48496640) (tried to allocate 8907 bytes) in /home/dhctrust/public_html/i/sapphire/core/model/MySQLDatabase.php on line 448
[28-Sep-2009 07:44:51] PHP Fatal error: Out of memory (allocated 48496640) (tried to allocate 21 bytes) in /home/dhctrust/public_html/i/sapphire/core/Object.php on line 588
[28-Sep-2009 07:46:40] PHP Fatal error: Out of memory (allocated 48496640) (tried to allocate 48 bytes) in /home/dhctrust/public_html/i/sapphire/core/model/DataObject.php on line 2831
[28-Sep-2009 07:46:48] PHP Fatal error: Out of memory (allocated 48234496) (tried to allocate 3831 bytes) in /home/dhctrust/public_html/i/sapphire/core/model/MySQLDatabase.php on line 448
[28-Sep-2009 07:47:02] PHP Fatal error: Out of memory (allocated 48496640) (tried to allocate 207 bytes) in /home/dhctrust/public_html/i/sapphire/core/HTTP.php on line 263
[28-Sep-2009 07:47:17] PHP Fatal error: Out of memory (allocated 48234496) (tried to allocate 35 bytes) in /home/dhctrust/public_html/i/sapphire/core/model/Translatable.php on line 435
[28-Sep-2009 07:47:37] PHP Fatal error: Out of memory (allocated 48496640) (tried to allocate 4864 bytes) in /home/dhctrust/public_html/i/sapphire/core/Object.php(491) : eval()'d code on line 1

Avatar
socks

29 September 2009 at 4:34am Community Member, 190 Posts

Maybe your php.ini?

memory_limit = 128M

Avatar
dalesaurus

29 September 2009 at 4:52am Community Member, 283 Posts

Yeah, looks like you're only getting 48M even though you changed the ini_set value. Perhaps your host has fixed max php memory to 48? Also check your .htaccess files and your root php.ini as socks suggested.

Avatar
ragunalth

29 September 2009 at 5:13am Community Member, 14 Posts

Yea I changed the php.ini file to 128MB and still the same issue.

This is so weird, I can't seem to find where its sets the memory.

I have changed the /saphire/core.php file, also added the ini_set('memory',"128M") in the /saphire/main.php file.

Also looked at the .htaccess file and its not specified, but still my silverstipe app only pics up 48M.

Any other tips to solve this please do.

Avatar
banal

29 September 2009 at 5:49am Community Member, 901 Posts

First of all, you should make sure that the setting (128M) really applies. The easiest way to do this is with phpinfo. Create a file (info.php) with the following contents and then open its URL in the browser:

<?php
phpinfo();
?>

Look for the memory_limit entry and check if the value is really set to 128M

Avatar
socks

29 September 2009 at 5:54am Community Member, 190 Posts

With Godaddy, they tell you to rename it to php5.ini instead of php.ini. Maybe your host has some similar requirement??

Avatar
ragunalth

29 September 2009 at 5:55am Community Member, 14 Posts

Yea I have done that...

Its says 128M..

max_input_nesting_level   64   64
max_input_time   60   60
memory_limit   128M   128M
open_basedir   no value   no value

Avatar
ragunalth

29 September 2009 at 6:32am Community Member, 14 Posts

I don't know what to do, this is so weird. Does anyone have any other ideas.

Go to Top