17488 Posts in 4473 Topics by 1978 members
| Go to End | ||
| Author | Topic: | 6323 Views |
-
Re: PHP memory limit problem

31 January 2007 at 2:23pm Last edited: 31 January 2007 2:54pm
I tried to install SS on my development machine running Vertrigo WAMP and had simlar issues with a null memory limit. I tracked it down to the fact that PHP was compiled without --enable-memory-limit.
If you do choose to subvert the installation by editing the install.php file, then you should be fine as there will be no limit at all on the memory.
However, this is a security risk on shared servers as any Idiot can bring the server to it's knees with a recursive function.
Considering the fact that most/all Apache installations on windows are compiled without --enable-memory-limit since it is not supported on windows, I suggest the following patch:
function requireMemory($min, $recommended, $testDetails) {
$this->testing($testDetails);
$mem = $this->getPHPMemory();
if (!$mem) {
$testDetails[2] .= " You have PHP compiled without --enable-memory-limit";
$this->warning($testDetails);
} else {
if($mem < $min) {
$testDetails[2] .= " You only have " . ini_get("memory_limit") . " allocated";
$this->error($testDetails);
} else if($mem < $recommended) {
$testDetails[2] .= " You only have " . ini_get("memory_limit") . " allocated";
$this->warning($testDetails);
}}
}
to config-form.html:<?php if($hasErrorOtherThanDatabase) { ?>
<p class="error">You aren't currently able to install the software. Please <a style="color: #CCF" href="#requirements">see below</a> for details.</p>
<?php } else { ?>
<?php if($req->hasWarnings()) { ?>
<p class="warning">There are some issues that we recommend you look at before installing, however, you are still able to install the software. Please see below for details.</p>
<?php } else if(!$dbReq->hasErrors()) { ?>
<p class="good">You're ready to install!
</p>
<?php } ?> -
Re: PHP memory limit problem

1 February 2007 at 7:01pm Last edited: 1 February 2007 7:02pm
Thanks for the patch, Jagged - we'll be putting this into version 2.0.0, due out very soon.
-
Re: PHP memory limit problem

1 February 2007 at 8:00pm
This has been fixed in our latest version (cheers Jagged, that's pretty much exactly what we did), due out shortly.
You will be able to install SilverStripe if you have between 20 MB and 32 MB of memory allocated, and also if we can't determine what the value of memory_limit is.
| 6323 Views | ||
| Go to Top |


