Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Shared Server

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

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

Page: 1
Go to End
Author Topic: 1979 Views
  • gakenny
    Avatar
    Community Member
    153 Posts

    Shared Server Link to this post

    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

  • gakenny
    Avatar
    Community Member
    153 Posts

    Re: Shared Server Link to this post

    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

  • Simon
    Avatar
    Core Development Team
    27 Posts

    Re: Shared Server Link to this post

    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

  • gakenny
    Avatar
    Community Member
    153 Posts

    Re: Shared Server Link to this post

    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

  • Matt
    Avatar
    Core Development Team
    84 Posts

    Re: Shared Server Link to this post

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

  • gakenny
    Avatar
    Community Member
    153 Posts

    Re: Shared Server Link to this post

    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

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