Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » PHP memory limit problem

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: 6835 Views
  • Tyssen
    Avatar
    Community Member
    3 Posts

    PHP memory limit problem Link to this post

    I'm trying to test Silverstripe out on my Windows machine running XAMPP and I can't get rid of the

    "SilverStripe needs a minimum of 20M allocated to PHP, but recommends 32M. You only have allocated"

    error message. I've edited both php.ini and php5.ini to be 32M but it doesn't make any difference.

    Any idea what I can do?

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: PHP memory limit problem Link to this post

    Can you confirm that the ini-change was actually recognized? You might be editing the wrong php.ini (xampp has zend optimizer enabled by default, which uses its own file). see http://www.apachefriends.org/en/faq-xampp-windows.html#phpini

  • gakenny
    Avatar
    Community Member
    153 Posts

    Re: PHP memory limit problem Link to this post

    Hello,

    Sorry to duplicate my post. I am having a similar issue but on a Linux box running Apache. My host has increased the memory limit to 32M but this is still not being detected by the installation script.

    Note that this message is not showing the current allocation:
    'SilverStripe needs a minimum of 20M allocated to PHP, but recommends 32M. You only have allocated'

    Cheers,

    Gary

  • Tyssen
    Avatar
    Community Member
    3 Posts

    Re: PHP memory limit problem Link to this post

    You were right Ingo, I hadn't modified the right .ini file. I have now, but still getting the same error message.

  • gakenny
    Avatar
    Community Member
    153 Posts

    Re: PHP memory limit problem Link to this post

    Hello,

    I may be wrong but I believe that if the function phpinfo() does not show '--enable-memory-limit' in the configure command then this issue will prevail.

    I'm not sure what additional step is required for this but I know my host has 'cracked' it and it works now.

    Cheers,

    Gary

  • Tyssen
    Avatar
    Community Member
    3 Posts

    Re: PHP memory limit problem Link to this post

    I remember now why I tried installing it locally - cos I couldn't log into the demo when I first tried.

    I'm in now and it all looks very impressive but unfortunately, I'm not going to be able to use it unless I change hosting company because my current one has a 10Mb memory limit set.

    I'm wondering if the memory limit is going to affect how many take up this CMS?

  • Enlightened_One
    Avatar
    Community Member
    18 Posts

    Re: PHP memory limit problem Link to this post

    I too am unable to get passed the PHP memory limit problem. I am using Apache 1.3.29 on OpenBSD 3.8. I have set my /var/www/conf/php.ini
    memory_limit= 32M

    Please advise.

  • Enlightened_One
    Avatar
    Community Member
    18 Posts

    Re: PHP memory limit problem Link to this post

    I tested the output of

    echo 'memory_limit = ' . (ini_get('memory_limit') . "\n";
    and I recieve a null value. Looking up the function ini_get at
    ###########################
    http://ca.php.net/manual/en/function.ini-get.php
    ###########################
    shows that PHP v 5.1 is required. I am running PHP v 5.04

    By commenting out the line
    $this->requireMemory(20*1024*1024, 32*1024*1024, array("PHP Configuration", "Memory allocated (PHP config option 'memory_limit')", "SilverStripe needs a minimum of 20M allocated to PHP, but recommends 32M.", ini_get("memory_limit")));

    I was able to bypass the memory_limit test, as I know it is set to 32M

    Obviously, this is not a solution. I have "worked around" this problem. I will look into a more "serious" solution later.
          
    In the meantime, I am happy to see the message
    "You're ready to install! "

    In the future, I will refrain from posting to "Bugs" until I really find a "bug".

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