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.


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

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

?stage=live not working


4 Posts   1784 Views


2 October 2008 at 11:47am Community Member, 2 Posts


All of a sudden my working site ( started throwing 500 internal server error. At least I am able to login now in the admin panel and see the draft site (?stage=stage) however the published site(?stage=live) is still showing 500 internal server error. Any clues?



2 October 2008 at 11:58am (Last edited: 2 October 2008 12:00pm), Community Member, 156 Posts

More than likely it is a common occurance that the site now needs more RAM.

Try putting this into your _config.php file.

ini_set('memory_limit', '128M');

If you have put custom functions into your page types and controllers you should check they are efficient, every bit of inefficient code will use more resources.


2 October 2008 at 2:12pm (Last edited: 2 October 2008 2:25pm), Community Member, 2 Posts

I thought memory limit was handled in sapphire/main.php (see below)

// Check we have at least 32M
if($memory < (32 * 1024 * 1024)) {
   // Increase memory limit
   ini_set('memory_limit', '32M');

Is is better to modify in main.php or _config.php? Can you also be more specific about which _config.php to modify as there are so many in different directories? The server error message says something about :

mod_fcgid: read data from fastcgi server error.
Premature end of script headers: main.php

(not sure what that is). thanks


2 October 2008 at 5:39pm Community Member, 156 Posts

it is better to put it into the _config.php in your mysite folder as that is specific to your site.

if you put it in main.php it could be overwritten if you upgrade the core.

failing that put the following at the top of your .htaccess file to tell php to increase the memory limit.

php_value memory_limit 128M