Drupal WSOD 错误 500

Drupal WSOD Error 500

我研究了 settings.php、index.php 和 .htaccess,但无济于事。 基本上我想将我的生产站点备份到我的 acquia dev desktop 2 站点。这里我备份了文件夹和数据库。

但是当我尝试加载网站时我得到 The website encountered an unexpected error. Please try again later. 并且在控制台日志中我得到:

GET https://omgyay.dd:8443/favicon.ico 404 (Not Found)  favicon.ico:1

GET https://omgyay.dd:8443/ 500 (500 Service unavailable (with message))  omgyay.dd/:1
Navigated to https://omgyay.dd:8443

在 apache 日志中我得到 PDOException: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.'

任何信息都有帮助。主要是关于如何打印出具体的错误信息。同样,此错误消息是在我将代码迁移到本地之后并且在安装后我可以看到任何网页之前出现的。

解决了我的问题。基本上 GET 错误与错误本身无关,但 Apache 日志提供了很多信息。

您可以通过单击左上角的 Acquia Dev Desktop > 首选项 > 日志 > Apache 错误找到日志。然后它打开一个 .txt 并一直滚动到底部。它告诉我我无法访问数据库。

我在 Settings.php 中输入错误的数据库用户名和密码并进行了更改。

在我的例子中 php7.0-crul 丢失了。

sudo apt-get install php7.0-crul

service apache2 restart

解决了问题。