【问题标题】:Blank page on SilverStripe site-manager after migration to nginx and PHP5.4迁移到 nginx 和 PHP5.4 后 SilverStripe 站点管理器上的空白页面
【发布时间】:2014-12-09 22:46:03
【问题描述】:

我最近将旧的 SilverStripe 2.3 网站从旧的 Apache 2.0 服务器迁移到使用 PHP 5.4 的新 nginx。

虽然我设法解决了大部分问题并且我可以访问 admin/assets 文件夹,但我仍然无法访问重要的 admin 页面、站点管理器和仪表板。当我尝试转到站点管理器或仪表板页面时,我得到一个没有错误的空白屏幕。

谁能告诉我为什么会这样?

Nginx 日志

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

【问题讨论】:

  • 新版本的 php 在编码标准方面更具限制性。您需要修复这些错误

标签: php nginx silverstripe


【解决方案1】:

SilverStripe 2.3 不适用于 PHP 5.4。

SilverStripe 2.3 是在 PHP 5.2 上开发的。 Sapphire 内核使用了许多 PHP 5.2 代码,这些代码在 PHP 5.3 和 PHP 5.4 中已被弃用或删除。

您需要升级您的 SilverStripe 版本,或将网站移至支持旧版本 PHP 的网络服务器。

一些笔记。

Silverstripe 2.3 已发布2009-02-23

2.3 (2.3.13) 的最新更新已发布2012-02-01

2.3 不再受支持。

Silverstripe 2.4 已发布2010-05-05

2.4 (2.4.10) 的最新更新已发布2013-02-19

2015-03-31之后将不再支持2.4。

截至撰写时,SilverStripe 的最新版本是 3.1.8。我建议升级到最新版本的 SilverStripe。这可能会很困难,具体取决于您网站中自定义代码和模块的数量。

至于您的具体错误之一:

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

正如错误所说,Controller 函数handleRequest() 应该具有与RequestHandler 函数handleRequest($request) 相同数量的参数。尝试将Controller 函数声明更改为handleRequest($request)

这可能会导致更多错误,或者您可能需要修复更多此类错误。这就是为什么我建议升级而不是尝试通过修复来编辑蓝宝石代码的原因。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-09-05
  • 2013-03-11
  • 2014-11-15
  • 1970-01-01
  • 1970-01-01
  • 2019-05-13
相关资源
最近更新 更多