简体   繁体   中英

Blank page on SilverStripe site-manager after migration to nginx and PHP5.4

I recently migrated an old SilverStripe 2.3 website from an old Apache 2.0 server to a fresh nginx with PHP 5.4.

Although I managed to resolve most of the problems and I have access to the admin/assets folder, I am still unable to access the important page of admin, the site-manager and the dashboard. When I try to go to the site-manager or the dashboard page I get a blank-white screen with no errors.

Can anyone advise why this is happening?

Nginx logs

FastCGI sent in stderr: "PHP message: PHP Strict Standards:  Declaration of Controller::handleRequest() should be compatible with RequestHandler::handleRequest($request) in /var/www/mydomain/sapphire/core/control/Controller.php

call_user_func() expects parameter 1 to be a valid callback, non-static method Hierarchy::extraStatics() should not be called statically in /var/www/mydomain/sapphire/core/model/DataObjectDecorator.php

SilverStripe 2.3 will not work on PHP 5.4.

SilverStripe 2.3 was developed on PHP 5.2. The sapphire core uses many bits of PHP 5.2 code that were deprecated or removed in PHP 5.3 and PHP 5.4.

You will either need to upgrade your SilverStripe version, or move the website to a web server that supports an older version of PHP.

A few notes.

Silverstripe 2.3 was released 2009-02-23 .

The last update for 2.3 (2.3.13) was released 2012-02-01 .

2.3 is no longer supported.

Silverstripe 2.4 was released 2010-05-05 .

The last update for 2.4 (2.4.10) was released 2013-02-19 .

2.4 will no longer be supported after 2015-03-31 .

As of writing the latest version of SilverStripe is 3.1.8. I would recommend upgrading to the latest version of SilverStripe. It might be difficult depending on the amount of custom code and modules in your site.

As for one of your specific errors:

FastCGI sent in stderr: "PHP message: PHP Strict Standards:  Declaration of Controller::handleRequest() should be compatible with RequestHandler::handleRequest($request) in /var/www/mydomain/sapphire/core/control/Controller.php

As the error says, the Controller function handleRequest() should have the same amount of parameters as the RequestHandler function handleRequest($request) . Try changing the Controller function declaration to handleRequest($request) .

This may cause more errors, or you may have many more errors like this to fix. This is why I suggest upgrading instead of trying to edit the sapphire code with fixes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM