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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

PHP Upgrade Causes Error: "End of script output before headers: main.php"


Go to End


2 Posts   2203 Views

Avatar
purplespider

Community Member, 89 Posts

20 July 2015 at 12:19am

I've discovered that when I upgrade PHP on my server from 5.4 to 5.5, all SilverStripe sites on the server return a 500 Server Error until a dev/build is run on each one.

The Apache error log shows the error is:

[Sun Jul 19 12:57:57.279194 2015] [core:error] [pid 215354] [client 82.29.160.195:49790] End of script output before headers: main.php

I'm about to upgrade my main server's PHP, and don't really want 50+ sites to be failing until a dev/build is run, so I'm trying to get to the bottom of what's causing this and exactly why a dev/build fixes it.

I've tried taking a database dump before and after the dev/build and comparing them, but there were no differences at all.

I've found that if I downgrade from PHP 5.5 to 5.4 this triggers the same problem, and dev/build is required again.

What else is dev/build changing that could be fixing this issue?

Avatar
purplespider

Community Member, 89 Posts

20 July 2015 at 3:33am

I've narrowed it down a little further. Seems that clearing the /tmp/silverstripe-cache-home-USERNAME-public_html/USERNAME/staticmanifest directory after the PHP upgrade stops the error for that site.

I compared the files inside this directory both before and after the issue and the only things that changed within them was the "i" number:

Anyone able to advise what this "i" number is? And how I could stop it from changing so that I won't need to clear the cache for all my SilverStripe sites after upgrading to PHP 5.5?