I am attempting to install SilverStripe for the firsttime but I keep getting a fatal error. The error says the following:
Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 84 bytes) in /home/kevbeck/public_html/traderite/sapphire/core/Object.php on line 254
However, I have raised the memory of PHP in my phpinfo.php file to 512M and I STILL get this error, which is ridiculous! Is there a workaround for this? If not I am going to dump the whole thing and get another CMS as I have spent hours trying to fix this problem already - I would like to use this CMS as it looks great and supports OpenSource, but if it can't install with 512M memory there is something seriously wrong. Even my host tech support team are baffled about this error.
I get that same 40M error message no matter what I set the php memory limit to - it just happens in different places when I change the memory limit. The limit is being changed, at the instruction of my web host, in the php.ini file in the SilverStripe uploaded files (/sapphire/core/ I think it is).
I'm not worried about a memory intensive version - I can sort that later - I can't even install at the moment.
I think I have a solution as to why simply changing the php.ini and .htaccess doesn't solve the memory problem...
Create a file and save it as: php.ini
Type the following into the php.ini document:
memory_limit = 32M ; Maximum amount of memory a script may consume (32MB)
upload_max_filesize = 32M
Then, save this php.ini file in every folder that has a script in it (all all the folders if you're no sure which have scripts or not). This means all sub-folders too.
The easiest way to do this is to do it on your PC/ Mac using copy and paste before uploading the folder containing the CMS up to your server. I.e. it can be a pain in the ass copy and pasting (and making sure it's the right file you're working with etc) on the server [unless you're good with shell commands and all that stuff].
Good Luck - I hope this helps others, because I was going mental for hours trying to fid a solution.
If 32M doesn't cut it - keep increasing it until you get the sweet spot...