Every php script failing with "Premature end of script headers:"

Ugh, what a mess… been working on this for the last two days.

My server got hacked, spewing out emails like crazy. My host shut it down (understandably) but let me recover my /home/ files(sites) and database.

My backups weren’t as timely as they should have been, so what I did was set up a new server (centos 6.5) (I think my previous was 6), set up my sites using vitualmin, then replaced the home directory with the content from my old server. And uploaded the old db content into the new database.

Pretty much set everything up to what I thought (and looks) like the original server (minus the one site that I suspect was hacked). I expected some issues, but that I could run things and fix little issues as I caught them.

What I didn’t expect… every php file results in an internal server error, and in the error logs it says “Premature end of script headers:”

At first I thought it was a wordpress issue, but then started testing some of my non-wordpress sites and found their php pages caused the same error. Regular html file load fine.

Any thoughts on how to track down the problem? I’d really appreciate some help.


Scratch that, if I let virtualmin set up the domain, then I extract scripts from public_html and copy them over, then they seem to work.

Trying a wordpress move the same way now…

Oh, worked for wp too. ah, ok, gonna be a long night getting sites set up now that I know how to do it.

Thanks for listening… sometimes it helps me figure it out if I try to explain it to someone else!

Feel your pain.

Keep 30 days worth of backups and make security your middle-name.

Amen on that! :slight_smile: