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.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Shared Server


Go to End


6 Posts   2983 Views

Avatar
gakenny

Community Member, 153 Posts

15 January 2007 at 9:53am

Hello,

I am new to SilverStripe and new to these forums - congratulations on building what looks to be an excellent tool!

Can I run SilverStripe on a shared server environment. ie. running CPANEL?

One issue is the memory size. As PHP.INI is a serverwide setting, can I override this in .htaccess? I tried to change the setting in this way but it did not work.

Kind regards,

Gary

Avatar
gakenny

Community Member, 153 Posts

15 January 2007 at 9:03pm

Hello,

I have had my memory size limit increased to 32M but I still get this error during installation:
Memory allocated (PHP config option 'memory_limit') SilverStripe needs a minimum of 20M allocated to PHP, but recommends 32M. You only have allocated

Any ideas?

Cheers,

Gary

Avatar
Simon

Community Member, 27 Posts

16 January 2007 at 11:26am

We'll have a look to see if the installers isn't doing anything funky, but check to see if php registers any memory settings by having a look at phpinfo() or run memory_get_usage(); to see whats actually being allocated to the installer script.

That should at least tell you what kind of memory is avaliable and see if the fault is with php or the config...

Cheers,
Simon

Avatar
gakenny

Community Member, 153 Posts

16 January 2007 at 11:32am

Hi Simon,

That function returns an error - however ini_get("memory_size") returns an error. Does PHP need to be compiled with the --enable-memory-limit configuration option?

Cheers,

Gary

Avatar
Matt

Community Member, 86 Posts

17 January 2007 at 5:45pm

On Windows at least, ini_get('memory_limit') doesn't seem to return anything usable (At least for me, using the Windows installer).Not sure if you're using Windows (I'm guessing not as you mentioned cPanel), but if you know that memory_limit is set to a high enough value, you can trick the installer into thinking that you've got a higher memory_limit by adding this: "return 33554432;" after line 173 of install.php.

It would then look like this:
function getPHPMemory() {
return 33554432;
$memString = ini_get("memory_limit");
... etc ...

That will trick the installer into thinking that you have 32 MB of memory. You shouldn't do this unless you know that you meet the minimum recommendations for SilverStripe (20 MB).

Avatar
gakenny

Community Member, 153 Posts

18 January 2007 at 8:52am

Hi Matt,

Thanks for the reply. I actually commented out the line causing the error and this seemed to get around this problem. However, an issue with PHP 5.2 has caused me to stall. This is being looked at and should be addressed shortly.

I suspect there should be a checkbox added to warning messages in the install.php to allow the check to be ignored and installation to continue.

Cheers,

Gary