In reply to:
Premature end of script headers: index.php
While there are actually several things than can be the cause of this, by far the most common reason on a shared server is that your user's php5.cgi processes are being killed by our procwatch daemon.
Procwatch is a daemon that runs constantly on shared servers to monitor the usage of RAM/CPU and execution time so that no single user can use an inappropriately high percentage of the shared resources and impact the overall health of the server or the server's ability to serve all users' pages.
When it finds a process that is using too great an amount of resources, iit kills that process. If it does this to a running script, the resultant error the server shows is "premature end of script headers" - the script can't complete.
If you routinely find your error logs showing this error, generate a support request and ask that they check the procwatch logs for the user you site is running as/under (the user that CGI runs as, or the FTP user under which the site is run).
If, in fact, this is what is happening, there are only two ways to resolve this:
1) Decrease the overall RAM, CPU, or execution time required for your scripts to process, create, and serve your site.
2) Move the site to a VPS (DreamHost PS), or dedicated server, where you can reserve sufficient RAM for your own processes to use without impacting other users on the server.
The first approach can prove difficult depending upon your scripts, your content, and your expertise, but if you can do that your site can continue to run on a shared server without errors. The second alternative is simpler, but involves additional cost for the PS services, and sufficient RAM/CPU to avoid these errors.
Hopefully, this explanation will be helpful for some here.
--rlparker
--DreamHost Tech Support