Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » installation woes

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

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

Page: 1 2
Go to End
Author Topic: 3972 Views
  • leemarrett
    Avatar
    Community Member
    6 Posts

    installation woes Link to this post

    hi there,

    well, after much to-ing and fro-ing with my hosting providers (webdrive) i've managed to get my installation past the "you need php 5 etc" screen, only to have the installation die at the next stage. I'm getting a: "*Fatal error*: Allowed memory size of 20971520 bytes exhausted (tried to allocate 45 bytes) in */home/funinc/funinc.biz/margmorrow/sapphire/core/Object.php* on line *217"

    the requirements screen told me there was just enough memory allocated (20M) to php to continue the process so any ideas as to why it would be dying there?

    Thanks
    Lee

  • gakenny
    Avatar
    Community Member
    153 Posts

    Re: installation woes Link to this post

    Hello,

    I suspect that the first screen has had it's memory limit checking 'loosened' due to inaccurate reporting of invalid memory.

    i suggest that you speak to your host about increasing the memory limit for PHP (as your error relates to the inability of allocating sufficient memory for the script) or try adding the following to your .htaccess:
    php_value memory_limit 20M

    Cheers,

    Gary

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: installation woes Link to this post

    The server requirements page suggests 32mbs at Least -- Set the maximum memory to at least 32 mb. Other then changing it via the php ini file or the .htaccess you can sometimes increase the maximum memory by adding a “ini_set(”memory_limit”,”32M”);” line to top of sapphire/main.php. The php.ini file is your best bet but whether your host allows it is another matter

  • leemarrett
    Avatar
    Community Member
    6 Posts

    Re: installation woes Link to this post

    thanks guys. alas, it's a virtual hosting provider and they say increasing the allocated memory to 32mb won't be happening any time soon. i even tried to get them to up it by 2mb and they won't let me do it.

    i'll try adding the line you've suggested to the .htaccess and see if there's any joy but otherwise it looks like i'm out of luck

    UPDATE:

    alas, no joy. here's my error after adding these lines:

    Warning: fopen(/home/httpd/vhlinks/www.domain.com/myfolder/.htaccess) [function.fopen]: failed to open stream: Permission denied in /home/folder/domain.com/folder/install.php on line 598
    # Building database schema...

    Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 16 bytes) in /home/folder/domain.com/folder/sapphire/core/Object.php on line 216

  • leemarrett
    Avatar
    Community Member
    6 Posts

    Re: installation woes Link to this post

    OK. So Webdrive very kindly finished the install for me. They increased the memory allocation temporarily then decreased it after the install was finished. While this has solved our problem temporarily, the simple fact is the hosting providers aren't going to increase the memory allocation so every time we want a fresh install we'll have to contact them. This is very helpful of them but isn't optimal.

    Also they say they had to modify the rewrite rules in the .htaccess for it to actually work as the CMS was NOT installed on the document root. It was installed inside a subfolder, so to get it to work they had to:

    (-)RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
    (+)RewriteRule .* /subfolder/sapphire/main.php?url=%1&%{QUERY_STRING} [L]

    this is something worth looking at for future versions perhaps?

  • Andy
    Avatar
    230 Posts

    Re: installation woes Link to this post

    The problem is that whether the original line or the line you have shown works seems to depend on how the environment is configured. In 2.0.2, the installer will check both configurations to check which one works.

  • Bitmand
    Avatar
    Community Member
    5 Posts

    Re: installation woes Link to this post

    As a server administrator I gotta say 32M is quite a lot and I can understand why hosting providers wont change the limit.

    Why does SS actually need that much?

    As I recall the default limit on a fresh PHP installation is 8M and I have never met any web application that needed more than that.

    I am at the moment hosting a couple of SS websites and I have adjusted the limit to 32M for those websites - but I don't think many hosting providers would do that. And if SS can't be installed on a common web host, I believe it would seriously decrease its popularity.

    It doesn't matter how fancy, great and amazing the CMS is if people can't run it

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: installation woes Link to this post

    good point about silverstripe memory usage, we can definetly improve here.
    building the database (db/build) and template cache (?flush=1) probably has the highest requirements, with normal cached requests you could get away with less memory.

    > I have never met any web application that needed more than that.
    http://wiki.typo3.org/index.php/System_requirements ;-)

    anybody keen on going through ManifestBuilder.php etc and looking for optimization-opportunities? (mainly manual object-destruction)

    3972 Views
Page: 1 2
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.