1
votes

I have a problem with my SilverStripe site after a server upgrade to PHP 5.6. My web host upgraded the server from PHP 5.3 to PHP 5.6 and now a 500 server error occurs on every page.

The message from SilverStripe is:

Sorry, there was a problem with handling your request.

In the server error log files there are no error entries. In the server access log you can see the 500 error:

ERROR: [09/Mar/2016:11:12:07 +0100] "GET /Security/login?BackURL=%2Fadmin HTTP/1.1" 500 11398 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 Safari/537.36"

Next entry in file is OK:

[09/Mar/2016:11:12:08 +0100] "GET /themes/ustheme/css/us.style.css HTTP/1.1" 304 0 "http://www.example.com/Security/login?BackURL=%2Fadmin" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 Safari/537.36"

How do I debug and fix this problem?

3
Look at the Server error logJens
Have you tried to run /dev/build? Sometimes you just have to rebuild the manifest.bummzack
[/dev/build] also returns the error: "Sorry, there was a problem with handling your request."Mitch
you should also flush and switch to dev-mode, see docs.silverstripe.org/en/3.3/developer_guides/debugging/… . Then you might see what's causing the error. Also - which version of silverstripe are you using? Maybe it's an old one that is just too old not compatible with php 5.6?wmk

3 Answers

2
votes

When switching PHP-version, your cache needs to be flushed. Switch your site to dev-mode to flush without having to logon. Or just delete your cache-directory (or create a root-directory named silverstripe-cache.)

1
votes

First try to flush the site cache as suggested by Simon Erkelens.

Sometimes flushing the cache will not work. This may be because the SilverStripe version cannot handle the PHP version.

If our site is on a server with cPanel some web hosts allow us to select the PHP version through cPanel. This feature is not on every server with cPanel but hopefully this becomes more common.

Select PHP version may be found in the cPanel software panel:

cPanel - Select PHP version screenshot 1

On the PHP selector screen there is a PHP version select box allowing us to select a PHP version. To change PHP version select an option from the PHP version select box and press the Set as current button. Flush the site cache to see if the site now works.

cPanel - Select PHP version screenshot 2

I recommend using the newest version of PHP that will work with the SilverStripe site so that it is as secure and stable as possible.

0
votes

run below command to get rid off from internal server error /dev/build

if your site is http://silverdemo.com

then run command like below

http://silverdemo.com/dev/build

it will rebuild the database and models